Hi.

I want a block to be showed in certain pages like

content/category/*

but not in other certain pages, form example:

content/category/term

Is it possible?

Thanks in advance.

Comments

Oblivious-1’s picture

From the block administration page locate the block in question, click "configure", and then update the "Page specific visibility settings" as appropriate.

kjv1611’s picture

Could someone explain in depth, possibly give examples or a reference as to how exactly to do this?

For instance, how do we reference a particular page that we ONLY want the content to show under?

I know that supposedly works for the home page, but how do we do that for other pages? Do we use the title? The web address? Some examples would be helpful.

Also, if you could tell of any differences between whether or not the site has "Clean URLs" enabled or not.

Thanks in advance for any help on this..

kjv1611’s picture

I've tried all of these inside the text block with the option "Show on only the listed pages.":

  • <=node/27>
  • <27>

None of that has worked... But I haven't tried:
<?q=node/27>

I'll try that one next while I wait for a response...

kjv1611’s picture

That didn't work either.

Any thoughts/suggestions/references?

Thanks,

kjv1611’s picture

I tried this:
node/27

with no brackets under the selection "Show on only the listed pages"

Is there a way to do this with the actual site "name" instead of the node, or does the web server have to support "clean urls" to get that to work.

ltwinner’s picture

That question is exactly what I'm wondering and I can't find an answer for it anywhere.

I want a block to show on user profile pages - user/*

but not on user/register or user/password

Can it be done?

ltwinner’s picture

Well I figured it out, here's what to do in case someone else has the same question. Select the 'Show if the following PHP code returns TRUE (PHP-mode, experts only).' on the block configuration page. Then use this code so the block only shows on pages with a number as the last part of the path -

<?php
    if (arg(0) == 'user' && is_numeric(arg(1))) {
        return true;
        }
    return false;
?>