Page 1 of 1

News Summary Template .......

Posted: Wed Aug 01, 2007 8:53 am
by raul.lnx
Hello, i have a little problem.  don't know how I can do this:

This is the original lines:
------------------------------
{if $entry->category}

MESSAGE1

{/if}
---------------------------

I want display a message is the name category is equal to "XXX", for example:

------------------------------
if "category_name"=="name1"
SHOW MESSAGE1
else
    if "category_name"=="name2"
  SHOW MESSAGE2
else
fi
fi
---------------------


Anyone can help me ??? Thanks !

Re: News Summary Template .......

Posted: Wed Aug 01, 2007 9:04 am
by RonnyK
{if $entry->category}
   
    MESSAGE1
   
{else}
   
    MESSAGE2
   
{/if}

is used for the if/else....

Here is a post on news to have every odd/even news-entry within a different class to be styled differently.

http://forum.cmsmadesimple.org/index.ph ... l#msg51971

Ronny

Re: News Summary Template .......

Posted: Wed Aug 01, 2007 11:19 am
by raul.lnx
I think you don't understand me.

I want something like this:


---------------
{if $params['category']=='PATTERN'){
DISPLAY MESSAGE
else
DON'T DISPLAY MESSAGE
{/if}
----------------

Display a message ONLY if the category name of the news is the same that mi pattern.