I have my secondary menu with source set to primary menu set inside the left column of my theme.
The problem I have is that if there is no content in the left region, then the menu won't display.
<?php if ($left): ?>
<div id="sidebar-left" class="section sidebar region"><div class="sidebar-inner">
<?php if ($secondary_menu): ?>
<div id="secondary">
<?php print $secondary_menu; ?>
</div>
<?php endif; ?>
<?php print $left; ?>
</div></div> <!-- /sidebar-left -->
<?php endif; ?>
I've tried setting the layout variable from preprocess() in template.php and while this gets set correctly, the $body_classes are minus the 'sidebar-left' class.
How can I get the theme to add the 'sidebar-left' class (and other relevant classes) to the $body_classes? or is there another way of achieving this??
if ($vars['secondary_menu']) {
$vars['layout'] = 'left';
}
Thanks.
Comments
Comment #1
Jeff Burnz commentedI normally use the excellent Menu block module for that sort of thing.
From the project page:
If that doesn't do the trick let me know :)
Comment #2
Steve cousins commentedAh, yes.. that's exactly what I'm looking for!
Thanks.