hello i have what i feel is (hopefully) an easy problem to solve. Basically i have my regions defined which is fine but i have my sidebar that i want to display on the right of the content region. if the sidebar has blocks the 'Content' region should gain a class that adjusts the width to allow the sidebar to display, if no content in sidebar then the content region should display in full width. In the page template i have this so far
<?php if ($page['sidebar_first']): ?>
<aside id="sidebar-first" role="complementary" class="sidebar clearfix">
<?php print render($page['sidebar_first']); ?>
</aside> <!-- /#sidebar-first -->
<?php endif; ?>
<?php if (!empty($page['sidebar_first']): ?>
<div class="content-region-sidebar-sibling">
<?php print render($page['content']); ?>
</div>
<?php else: ?>
<?php print render($page['content']); ?>
<?php endif; ?>
yet the line for
<?php (!empty($page['sidebar_first']); ?>
continues to return TRUE whether the region has content or not..
i need to know how to fix this syntax so that if my sidebar region is with blocks, the content region will receive the class assigned(which is how i'm editing the width) and will not get the class if there is no sidebar blocks active on that page. Can anyone help?