If Statements in Styles

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

If Statements in Styles

Postby Spalace » Mon May 30, 2005 8:43 pm

I've had a look through the forum but couldn't find anything that explained what I wanted to do.

On my site I've got three different Category's that I want to display on the home page of the site and i've set this up using maginot and using the "default Headline" style.

Can I use an If Statement to check which catergory the story belongs and change the image that is located in the background of the table to a different one:

Code: Select all
<table width="467" border="0" cellspacing="1" cellpadding="0">
            <tr height="32">
            <td height="32" background="http://www.superpalace.co.uk/revamp/img/head_bar.jpg">


If category equals - "Default" - I'd want this image http://www.superpalace.co.uk/revamp/img/new_bar.jpg

If the category equals - "Match" - I'd want this image http://www.superpalace.co.uk/revamp/img/match_bar.jpg

If the category equals - "Squad" - I'd want this image http://www.superpalace.co.uk/revamp/img/squad_bar.jpg

Hope that makes sense and that someone can help
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Re: If Statements in Styles

Postby Parahead » Tue May 31, 2005 5:48 am

Code: Select all
<If: Category eq "Match">
 <img src="http://www.superpalace.co.uk/revamp/img/match_bar.jpg">
<If: Else: Category eq "Squad">
 <img src="http://www.superpalace.co.uk/revamp/img/squad_bar.jpg">
<If: Else>
 <img src="http://www.superpalace.co.uk/revamp/img/new_bar.jpg">
Yes, I am still around...
User avatar
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Return to Customization

Who is online

Users browsing this forum: No registered users and 2 guests