Module Description
This module adds an exclude pages filter for blocks. To exclude specific pages after the wild card or in between wildcards, simply prefix the path pattern with a prefixed '!' in the block page visibility configuration.
Show - or - hide blocks on specific paths
This works for visibility set to "show for the listed pages", in this case, the exclude paths will hide the block on pages that match the despite the wildcard set to show.
Or the other way around, if the page list is set to "hide for the listed pages" the excluded paths will show the block on pages where the pattern matches despite the wild card set to hide.
Basic example where a wildcard is used to display the block on pages under the user path:
/user/* <-- this will make the block visible on all pages under the path.
But let's say you want to exclude a specific page or another path directory under the path "/user/?":
!/user/jc <-- now you will be able to specifically exclude the "jc" page
or/and:
!/user/jc/* <-- exclude on all pages under "jc/?"
( Drupal 7 - No need for leading slashes on the URL as of Drupal 7 standards )
Happy Coding!
Show - or - hide blocks on specific paths
This works for visibility set to "show for the listed pages", in this case, the exclude paths will hide the block on pages that match the despite the wildcard set to show.
Or the other way around, if the page list is set to "hide for the listed pages" the excluded paths will show the block on pages where the pattern matches despite the wild card set to hide.
Basic example where a wildcard is used to display the block on pages under the user path:
/user/* <-- this will make the block visible on all pages under the path.
But let's say you want to exclude a specific page or another path directory under the path "/user/?":
!/user/jc <-- now you will be able to specifically exclude the "jc" page
or/and:
!/user/jc/* <-- exclude on all pages under "jc/?"
( Drupal 7 - No need for leading slashes on the URL as of Drupal 7 standards )
Happy Coding!
Module Link
Project Usage
6102
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the problem of showing or hiding blocks on specific paths by adding an exclude pages filter for blocks in Drupal 7.
Data Name
block_exclude_pages