Change Content region width when Sidebar has content? 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 

&lt;?php if ($page['sidebar_first']): ?&gt;
         &lt;aside id="sidebar-first" role="complementary" class="sidebar clearfix"&gt;
           &lt;?php print render($page['sidebar_first']); ?&gt;
         &lt;/aside&gt; &lt;!-- /#sidebar-first --&gt;
         &lt;?php endif; ?&gt;
         &lt;?php if (!empty($page['sidebar_first']): ?&gt;
         &lt;div class="content-region-sidebar-sibling"&gt;
         &lt;?php print render($page['content']); ?&gt;
         &lt;/div&gt;
         &lt;?php else: ?&gt;
           &lt;?php print render($page['content']); ?&gt;
         &lt;?php endif; ?&gt;


yet the line for
       &lt;?php (!empty($page['sidebar_first']); ?&gt;
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?
$page['sidebar_first'] is an empty array when you have no content in that region. So it is defined and the condition 

if ($page['sidebar_first']):


is true even if you have no block in the sidebar. So 

print render($page['sidebar_first'])


gets executed and, after the rendering, $page['sidebar_first'] will look something like

array(
  '#printed' =&gt; true,
  '#children' =&gt; '',
)


meaning that it's no longer empty and the condition if (!empty($page['sidebar_first']): will be met in any case. You may want to rewrite your code to something like

      &lt;?php if (!empty($page['sidebar_first']): ?&gt;
       &lt;aside id="sidebar-first" role="complementary" class="sidebar clearfix"&gt;
         &lt;?php print render($page['sidebar_first']); ?&gt;
       &lt;/aside&gt; &lt;!-- /#sidebar-first --&gt;
       &lt;div class="content-region-sidebar-sibling"&gt;
         &lt;?php print render($page['content']); ?&gt;
       &lt;/div&gt;
     &lt;?php else: ?&gt;
       &lt;?php print render($page['content']); ?&gt;
     &lt;?php endif; ?&gt;