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

welly’s picture

Ok, 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.