News Summary Template .......

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
raul.lnx
Forum Members
Forum Members
Posts: 26
Joined: Wed Jun 28, 2006 5:55 pm

News Summary Template .......

Post 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 !
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post 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
Last edited by RonnyK on Wed Aug 01, 2007 9:14 am, edited 1 time in total.
raul.lnx
Forum Members
Forum Members
Posts: 26
Joined: Wed Jun 28, 2006 5:55 pm

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

Post 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.
Post Reply

Return to “Layout and Design (CSS & HTML)”