When specifying block inclusion/exclusion based on URL, what are the limitations on path wildcards?

This is the feature that is specified with the:

"All pages except those listed" (i.e. exclusion)

and

"Only the listed pages" (i.e. inclusion)

radio buttons and associated text entry field, in the "Pages" tab of the block visibility settings.

Does the underlying PHP code support multiple wildcards in a specifier?

For example we know that:

myfirstpathsegment/*

works.

However, does the internal code support

my1stpathsegment/*/my2ndpathsegment/*

wildcard specification for block visibility?

Comments

Jaypan’s picture

If I recall correctly, yes.

Deb Bailey’s picture

Hi... I am new to drupel and the drupel site. I have a drupel site that is now my responsibility to update the content on... I have to add a new office address to the footer and to the contact us page. Please be patient with me as I don't know if this is the place to be with this... I created my address block but can't figure out how to add it to the footer... I have three addresses already... can't a fourth be added to the footer? do I need to do something with the regions section? if this isn't the place to be with this, can you help me get to where I need to go to get help figuring this out. Thanks so much! Deb

sprite’s picture

Briefly though, you can have as many blocks on a Drupal site as you want.

On the structure/blocks page just designate which region you want it on and specify URLs should or should not contain it.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

Deb Bailey’s picture

Hi Sprite... can we chat about you helping me?

sprite’s picture

Since you are a beginner, I would suggest that you purchase one or more of many books available about developing websites with Drupal, so that you can develop greater understanding.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

sprite’s picture

I fixed this problem by implementing a context to exclude the block display further along the path.

I wanted to show a block at:

path/*

but not at:

path/*/path/*

--
I configured the block with "only on pages" using:

path/*

Then I created a context from the context UI triggering on path with path:

path/*/path/*

with the block disable reaction for the desired block on that path specification.

The "block disable" context reaction is implemented by the module below, which is a plugin module for the context module.

https://www.drupal.org/project/context_block_disable

This solution works well.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...