Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It appears that the sidebar markup is showing up whether a sidebar has markup or otherwise. I've tried using
<?php if (!empty($page['sidebar_first'])): ?>
But it appears that the page array contains sidebar_first or sidebar_second elements whether or not the sidebars have content. Is there a way of checking the content first before including those elements?
Comments
Comment #1
welly CreditAttribution: welly commentedOk, strange. Now the markup *doesn't* show the sidebar markup when it's empty. I suspect it might have something to do with devel_themer being enabled.