Page 1 of 1

SOLVED: Separating page aliases

Posted: Fri Sep 11, 2009 7:49 am
by rhysdavies
I want to make an 'if' statement to apply css to specific pages, but cannot work out how to separate the page aliases.

I am using a very straightforward bit of code, which as it stands, works with no problems.  

Code: Select all

{if $page_alias == "[color=red]home[/color]"}
  <div class="blogs-showblogsentry{cycle values="1,2"}">
{else}
<div class="blogs-showblogsentry1">
{/if}
However, instead of "home", I need home, blogs and news.  I have tried "home, blogs, news" and "home", "blogs", "news" etc. but cannot work out the correct separation of page names.

Any help would be greatly appreciated.

Cheers

Re: Separating page aliases

Posted: Fri Sep 11, 2009 8:01 am
by RonnyK
{if $page_alias == "home" | $page_alias == "blogs" | $page_alias == "news"}

Ronny

Re: Separating page aliases

Posted: Fri Sep 11, 2009 8:06 am
by rhysdavies
Thank you very much ,Ronny!