Block display using wildcard, non-greedy I have a block that I have configured to display "Only on the listed pages"

commerce_store/store/*


The problem is, it displays not only on the view link, which I want it to, but on the edit and other menu tabs

commerce_store/store/1        &lt;-- good
commerce_store/store/1/edit   &lt;-- bad
commerce_store/store/1/sales  &lt;-- bad


I've tried switching to PHP code, but this doesn't seem to have any effect whatsoever. I've even changed the code to var_dump($path); exit; and it doesn't exit.

Edit: This code works, just enclose it in &lt;?php and ?&gt;

$path = current_path();
$url_parts = explode('/', $path);
if( $url_parts[0] == 'commerce_store' &amp;&amp; $url_parts[1] == 'store' &amp;&amp; count($url_parts) == 3 ) {
  return TRUE;
}
Note that you can use arg(x) where x is the position in the path starting from 0, so you could do something like this as well:

&lt;?php
if (arg(0) . arg(1) == 'commerce_storestore' &amp;&amp; !arg(3)) {
  return TRUE;
}
?&gt;


You could also use drupal_match_path() like so: 

&lt;?php
if (drupal_match_path(current_path(), "commerce_store/store/*") &amp;&amp; !arg(3)) {
  return TRUE;
}
?&gt;


Cheers,