Has custom sidebars changed?
Posted: Tue Jan 26, 2016 7:00 am
In the past, I have defined custom sidebars like this:
This resulted in a visual sidebar container in the backend, and allowed a conditional test and sidebar output such as this:
This works great in the Kinetic template... including with the latest 2.1 snapshot.
However, in my latest theme (not yet released), I cannot get a smarty value for $CustomSidebarElements... I looked quickly for newer themes with custom sidebars, and found "bartleby". That theme's config for sidebars looks like this:
And is used in index.tpl like this:
This theme also does not create a $bottomSidebarElements value. The theme's template files do not rely on any conditional test for the smarty variable, but using {debug} I do not see a smarty variable named $bottomSidebarElements.... although, $leftSidebarElements, and $rightSidebarElements *DO* exist, even though neither are defined by the theme's config.
What am I missing here?
Code: Select all
array(
'var' => 'sidebars',
'name' => 'Sidebars',
'type' => 'hidden',
'value' => 'custom,left,right,hide',
),
Code: Select all
{if $CustomSidebarElements >0}
<div id="serendipityCustomSideBar">
{serendipity_printSidebar side="custom"}
</div>
{/if}
However, in my latest theme (not yet released), I cannot get a smarty value for $CustomSidebarElements... I looked quickly for newer themes with custom sidebars, and found "bartleby". That theme's config for sidebars looks like this:
Code: Select all
$template_config['sidebars'] = array('hide,bottom');
$serendipity['sidebars'] = array('hide', 'bottom');
Code: Select all
<footer id="sidebar_bottom" class="clearfix">
{serendipity_printSidebar side="bottom"}
</footer>
What am I missing here?