Module: Extended block visibility

Mark Pavlitski's picture
Jun 19th 2013Technical Director

As a purely Drupal development agency, we are always looking for ways to improve our experience with Drupal.

One of the most common scenarios we experience is getting developers to keep track of block settings during deployment.

On all but the most basic of sites there can be hundreds of blocks, and when a team of developers are working together on a big project some of these changes can be forgotten or overlooked.

Issues vary from an 'oops!' because a bit of content dissapeared for a moment, to problematic when a block's PHP visibility snippet has been copied incorrectly or missed, resulting in a WSOD and a hasty database roll-back. (At least it's only on staging!)

In keeping with the Drupal community spirit, our solution comes in the form of a contrib module which everyone can benefit from:

 

Introducing Extended block visibility

Extended block visibility pulls Drupal's block settings out of your database and plants them firmly in your custom module.

Each block is allocated a list of candidate functions, any of which can be used to determine whether or not the block should be shown.

This means we can edit block visibility settings in our editor of choice (rather than inline on the site) and we can keep track of it all in git, which makes for really easy deployments.

 

You can download Extended block visibility from Drupal.org. Alternatively, please get in touch if you would like Drupal training or developer support.

Darren Whittington's picture

You may also like...

Drupal 8, Symfony and Frameworks

Darren Whittington, Jun 3rd 2013
Having recently started working with Drupal in module development and published my first public Module, my interests have gravitated around the next...

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Related Blogs

Sophie Shanahan-Kluth's picture
Rick Donohoe's picture
Mark Pavlitski's picture