SOLVED: Separating page aliases

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
rhysdavies
Forum Members
Forum Members
Posts: 31
Joined: Thu Oct 04, 2007 9:23 am

SOLVED: Separating page aliases

Post 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
Last edited by rhysdavies on Fri Sep 11, 2009 8:06 am, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Separating page aliases

Post by RonnyK »

{if $page_alias == "home" | $page_alias == "blogs" | $page_alias == "news"}

Ronny
rhysdavies
Forum Members
Forum Members
Posts: 31
Joined: Thu Oct 04, 2007 9:23 am

Re: Separating page aliases

Post by rhysdavies »

Thank you very much ,Ronny!
Post Reply

Return to “CMSMS Core”