[support] Block visibility quandry
Shai Gluskin
shai at content2zero.com
Wed May 28 11:32:27 UTC 2008
Hi Neil,
I don't know if the UI for the block module settings will allow regular
expressions. I doubt it, but give it a try and report back.
However, what will surely work is putting in your own php. Have you noticed
that radio for adding PHP to return "TRUE" to make block visible? That's
your answer.
Here's a code snippet that should get you started:
http://drupal.org/node/64135#page-visibility
Here is one that is a little more sophisticated which was designed for the
Google Analytics module... when to include the tracking code on a page --
totally analogous to block visibility:
http://drupal.org/node/261997
Good luck. And please add your snippet to the handbook page.
Shai
On Wed, May 28, 2008 at 5:57 AM, 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?
>
> Thanks
>
> Neil
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080528/b21b205f/attachment.htm
More information about the support
mailing list