Helper module for complex php visibility of blocks in Drupal.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Block Visibility Helper Object


  1. Enable this module.

Example usage in the block visibility form:

if (class_exists('BlockVisibility')) {
  $obj = new BlockVisibility();
  $obj->hide_if_alias('library', 'library/browse');
  return $obj->isVisible();

In the above example there are four rules. The first rule to match will be returned by isVisible(). The first rule determines the default value; if the first rule is show then the default will be the opposite and will be used if no rules match.