Page Specific Visibility Settings

The Page Specific Visibility Settings options allow the administrator to define exactly on which pages a block should appear. Two approaches are available for doing this. The first leverages the Drupal menu system to build a list of pages where a block should or shouldn't appear, and the second allows the administrator to write a segment of PHP code that determines whether or not a block is to appear.

The first two options of the Show Block on Specific Pages field, "Show on every page except the listed pages" and "Show on only the listed pages," expect a list of Drupal paths, possibly including wildcards. You can use any Drupal path or path fragment as a mask, as well as the asterisk wildcard (*) to cover whole sections of the site. If you have the Path module activated, you can also use the custom paths, or aliases, that you have created. The special variable <front> exists to represent the front page of your site, which is difficult to address otherwise, as it has no path. Exercise 2-2 demonstrates controlling block visibility with the "Show on only the listed pages" option.

0 0

Post a comment