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">


Example:

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
Spalace
 
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">
</If>
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
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 1 guest

cron