Panels comes with a great feature where you can control the visibility of individual panel panes. Visibility rules are useful when you need to show or hide a pane based off some criteria. You can add a rule by clicking on the cogwheel on the pane and then click on “Add new rule” within the Visibility rules section.
The default options are fine for simple configuration. But sometimes youâ€™ll need to write a bit of code to implement complex requirements. To handle this functionality Panels utilises the Ctools access plugin. So if you need to build custom visibility rules then just write your own access plugin.
Today Iâ€™ll show you how to create a basic access plugin for those times when the default options wonâ€™t cut it.Continue reading