View Single Post
  #6  
Old 06-13-2010, 07:47 AM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: How do I put an Affiliate Links/Images on category page

You need an {if} statement first, then an {elseif} or {else} statement and close all of them with a {/if}

So, the bare minimum would look like this:
Code:
{if cat eq '1'} Stuff {elseif $cat eq '2'} Stuff {/if}


Use eq for equels, neq for not equals, gte for greater than or equal, gt for greater than, lt for less than, lte for less than or equal.


As for multiple within one category, just put them inside the statement for that such as this:

Code:
{if $cat eq '1'} <a href="www.link1.com"><img src="www.foobar.com/gif.gif"></img></a> <a href="www.link2.com"><img src="www.foobar.com/gif.gif"></img></a> {elseif $cat eq '2'} <a href="www.link3.com"><img src="www.foobar.com/gif.gif"></img></a> <a href="www.link4.com"><img src="www.foobar.com/gif.gif"></img></a> {/if}
__________________
- Shane Munroe
Reply With Quote