In a block configuration, I would like to show the block on /programs/* but not on programs/* /*
I have seen a number of questions similar to mine. Block display using wildcard, non-greedy for example.
The recommendation from the above link to use drupal_match_path() makes the most sense to me. I have implemented the following,
<?php
if (drupal_match_path(current_path(), "programs/*") && !arg(2)) {
return TRUE;
}
?>
expecting the block to appear on /projects/name but not on /projects/name/grandchild-node. The block doesn't appear anywhere. Just to test the system, I tried this:
<?php
if (drupal_match_path(current_path(), "programs/*") {
return TRUE;
}
?>
and still the block doesn't show. I'm certain that I'm doing something wrong that is very basic. Any ideas?