Hi All!
I'm hoping someone can help guide me with what I'm trying to do. I am using the Top simple navigation + left subnavigation + 1 column for a new site. This works perfectly for us except one thing we need done.
We have removed the news block as we don't use it. But now we have a huge blank space now. So, what I am trying to achieve is the following;
If no sub-navigation menu to be displayed on the left, expand the content section to use full width. Else show sub-navigation and content as usual.
Hope that makes sense and is doable somehow.
Thanks
Dave
[solved] Expand Content block if no sub-navigation - Top sim
[solved] Expand Content block if no sub-navigation - Top sim
Last edited by dgbaker on Wed May 30, 2012 9:06 pm, edited 1 time in total.
Re: Expand Content block if no sub-navigation - Top simple n
You can do it but the default #content has CSS that keeps it 29% away from the left, so you would have to make changes to the CSS as well as the template...
{menu template='simple_navigation.tpl' start_level='2' collapse='1' assign='sidemenu'}
{if !empty($sidemenu)}
<div id="sidebar">
<div id="sidebara">
<div id="menu_vert">
<h2 class="accessibility">Sub Navigation</h2>
{$sidemenu}
<hr class="accessibility" />
</div>
</div>
</div>
<div class="back1">
{else}
<div class="back1wide">
{/if}
This will check the menu, if not (!) empty it will show the normal divs else it will give you a new div with class of back1wide which you will have to use CSS to style as you want...
{menu template='simple_navigation.tpl' start_level='2' collapse='1' assign='sidemenu'}
{if !empty($sidemenu)}
<div id="sidebar">
<div id="sidebara">
<div id="menu_vert">
<h2 class="accessibility">Sub Navigation</h2>
{$sidemenu}
<hr class="accessibility" />
</div>
</div>
</div>
<div class="back1">
{else}
<div class="back1wide">
{/if}
This will check the menu, if not (!) empty it will show the normal divs else it will give you a new div with class of back1wide which you will have to use CSS to style as you want...
Re: Expand Content block if no sub-navigation - Top simple n
Thanks Dr. that worked great for me and did what I needed.
Cheers!
Cheers!