Posted: Mon Oct 13, 2008 4:48 pm
Hi!
Ah, in that case your CSS / DIV-Layout must be made so that the extra sidebars do not emit their own containers.
The bulletproof template does not pay attention whether a sidebar is empty or not. It always emits the surrounding HTML. So you need to either use a template that supports filling up the whole area when no sidebar elements are pressent, or you need to modify the bulletproof index.tpl some more.
Let's take the first occurence of the printSidebar in BP's index.tpl for example:
As you might be able to see, the IF check for more than 0 sidebar elements comes rather late at the end. You would need to change it to something like this:
See how I moved the IF-Query to the top of that. So when no left sidebar elements are there, the whole block is not shown.
I don't understand the whole Layouttype methods of BP, so it might be more complex to use a placeholder div/class that instructs BP to not use up space for the sidebar. I believe only YellowLED, David or Don could offer a hand on that.
Regards,
Garvin
Ah, in that case your CSS / DIV-Layout must be made so that the extra sidebars do not emit their own containers.
The bulletproof template does not pay attention whether a sidebar is empty or not. It always emits the surrounding HTML. So you need to either use a template that supports filling up the whole area when no sidebar elements are pressent, or you need to modify the bulletproof index.tpl some more.
Let's take the first occurence of the printSidebar in BP's index.tpl for example:
Code: Select all
{if $template_option.layouttype == '3sbs'}
<!-- case 1: 3 columns, sidebar-content-sidebar -->
<div id="serendipityLeftSideBar" class="threeside layout3sbs_left">
{if $template_option.sitenavpos == 'left'}
<!-- #sbsitenav: like #sitenav, but placed within the sidebar -->
<div id="sbsitenav" class="serendipitySideBarItem">
<h3 class="serendipitySideBarTitle">{$template_option.sitenav_sidebar_title}</h3>
<div class="serendipitySideBarContent">
<!-- the line below must remain as a single uninterrupted line to display correctly in ie6 -->
<ul>{foreach from=$navlinks item="navlink" name="sbnav"}<li class="{if $currpage==$navlink.href}currentpage{/if}
{if $smarty.foreach.sbnav.first} sbnavlink_first{/if}{if $smarty.foreach.sbnav.last} sbnavlink_last{/if}">
<a href="{$navlink.href}" title="{$navlink.title}">{$navlink.title}</a></li>{/foreach}</ul>
</div>
<div class="serendipitySideBarFooter"></div>
</div>
{/if}
{if $leftSidebarElements > 0}{serendipity_printSidebar side="left"}{/if}
</div>
Code: Select all
{if $template_option.layouttype == '3sbs' && $leftSidebarElements > 0}
<!-- case 1: 3 columns, sidebar-content-sidebar -->
<div id="serendipityLeftSideBar" class="threeside layout3sbs_left">
{if $template_option.sitenavpos == 'left'}
<!-- #sbsitenav: like #sitenav, but placed within the sidebar -->
<div id="sbsitenav" class="serendipitySideBarItem">
<h3 class="serendipitySideBarTitle">{$template_option.sitenav_sidebar_title}</h3>
<div class="serendipitySideBarContent">
<!-- the line below must remain as a single uninterrupted line to display correctly in ie6 -->
<ul>{foreach from=$navlinks item="navlink" name="sbnav"}<li class="{if $currpage==$navlink.href}currentpage{/if}
{if $smarty.foreach.sbnav.first} sbnavlink_first{/if}{if $smarty.foreach.sbnav.last} sbnavlink_last{/if}">
<a href="{$navlink.href}" title="{$navlink.title}">{$navlink.title}</a></li>{/foreach}</ul>
</div>
<div class="serendipitySideBarFooter"></div>
</div>
{/if}
{serendipity_printSidebar side="left"}
</div>
I don't understand the whole Layouttype methods of BP, so it might be more complex to use a placeholder div/class that instructs BP to not use up space for the sidebar. I believe only YellowLED, David or Don could offer a hand on that.
Regards,
Garvin