How do I alternate styles for entries or sidebar?
Posted: Sun Dec 18, 2005 5:19 pm
Hi all,
I'm wondering if I can use the following smarty code to alternate the styles for either entries on the startpage, or for sidebar titles on every page. I've had an idea for a completely new theme, but to make it really stand out I need to alternate styles, especially the sidebar.
I have tried replacing 'comments' with other variables that I've found in the entries.tpl or sidebar.tpl but none seem to work, I wonder if this is because they aren't odd or even. Can this be done? Would I be able to incorporate this into a theme without having to install a new plugin?
Thanks for any help,
Carl
I'm wondering if I can use the following smarty code to alternate the styles for either entries on the startpage, or for sidebar titles on every page. I've had an idea for a completely new theme, but to make it really stand out I need to alternate styles, especially the sidebar.
Code: Select all
{if $smarty.foreach.comments.iteration is odd}graybox{/if}Thanks for any help,
Carl