Drupal7 PHP-mode, experts only: adding php-rule to show pages || blocks
Declare exactly via
query string param
<?php
if ($_GET['q'] == 'user') {
return TRUE;
}
else {
return FALSE;
}
?>
Declare through the obtaining of the URI parts
finds a path pieces, split with solidus (/)
<?php
if (arg(0) == 'user') {
return TRUE;
}
else {
return FALSE;
}
?>
Result: uri - site.com/user will get TRUE value for the applied rule
E.g.: $_GET['q'] == 'user/login'
(arg(0) == 'user' && arg(1) == 'register') equal to the path: user/register