[support] Block visibility quandry

Cog Rusty cog.rusty at gmail.com
Wed May 28 10:59:10 UTC 2008


On Wed, May 28, 2008 at 12:57 PM, Neil: esl-lounge.com
<neil at esl-lounge.com> wrote:
> I have a block which I show on a user's main page, user/1, user/2, etc.
>
> I have set block visibility to "only show on pages" with user/* entered
> below.
>
> Unfortunately, it's also showing on user/register, user/password.
>
> I don't suppose I can use regular expressions to make the wildcard ONLY
> numeric, can I? How would I get the block to show on user/7 but not
> user/register?


Maybe a php condition like:

if(arg(0)==user && ctype_digit(arg(1))) { return true; } else { return false; }


> Thanks
> Neil
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list