Page 1 of 1

Back Again - I need some smarty help please [Solved]

Posted: Wed Mar 14, 2007 6:40 pm
by tmeyer45458
I'm attempting to use "or" within a smarty tag but can't seem to make it work.  Each time I use the code in bold font, "boo" shows on everypage.  Now, if I omit ["this-page" or "that-page"] then "boo" shows on the about page and "boohoo" shows on the dealers page.  My code is as follows:

{if $page eq "about-us" or "this-page" or "that-page"}
boo
{elseif $page eq "dealers"}
boohoo
{else}
Catch all content
{/if}

How do I "group" pages together using the "or" operator...or any other method for that matter?

I'm simply trying to make it possible to show different content in the sidebar for different pages.  For the most part all is working, but when I try to show the same content on more than one page I run into issues.

Thanks in advance for the help!

Tim

Re: Back Again - I need some smarty help please [Solved]

Posted: Wed Mar 14, 2007 7:31 pm
by tmeyer45458
My question was answered at the DP forums.  In case someone has a similar question heres the answer:

{if $page eq "about-us" or $page eq "this-page" or $page eq "that-page"}