Page 1 of 1

{serendipity_printSidebar} alternate tpl?

Posted: Wed Feb 20, 2008 6:06 pm
by Don Chambers
Part 1:
Is it, or could it be, possible to specify an alternate tpl file for a sidebar?

What I am thinking is that I might want one sidebar.tpl as my normal, but perhaps sidebar_right.tpl for the right.

I'm thinking something like:

Code: Select all

{serendipity_printSidebar side="right" template="sidebar_right.tpl"}
Part 2:
We have the ability to create sidebar containers other than left and right.

Lets say I have a sidebars named left, bottom, right (and hide) that I have created in my template configuration. I can do {if $leftSidebarElements > 0} and the same for right, but at the moment, I cannot do {if $bottomSidebarElements > 0}.... can that become reality?

Posted: Wed Feb 20, 2008 11:11 pm
by abdussamad
Part 2:
We have the ability to create sidebar containers other than left and right.

Lets say I have a sidebars named left, bottom, right (and hide) that I have created in my template configuration. I can do {if $leftSidebarElements > 0} and the same for right, but at the moment, I cannot do {if $bottomSidebarElements > 0}.... can that become reality?
I can help you with that. Just add these two lines in your theme's config.inc.php file:

Code: Select all

$BottomSidebarElements = serendipity_plugin_api::count_plugins('bottom');

$serendipity['smarty']->assign_by_ref('BottomSidebarElements', $BottomSidebarElements);

Re: {serendipity_printSidebar} alternate tpl?

Posted: Thu Feb 21, 2008 10:58 am
by garvinhicking
Hi!

Part1 committed to SVN, with the syntax you described.

Regards,
Garvin

Posted: Thu Feb 21, 2008 4:24 pm
by Don Chambers
I love it when a plan comes together!!! :D

Thanks Abdussamad & Garvin!