Module: Extended block visibility
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.