View Single Post
  #1  
Old 02-18-2005, 03:36 AM
 
ian_fs ian_fs is offline
 

Advanced Member
  
Join Date: Apr 2004
Location: Norwich, UK
Posts: 86
 

Default Alternating Colours / Whatever

This is a really simple and useful Smarty function, which allows you to have alternating colours, or really anything that might need alternating.

Code:
{cycle values="#000000,#FFFFFF"}

or

Code:
{cycle values="#000000,#FFFFFF,#006699"}

or

Code:
{cycle values="style1,style2"}

eg.

<div class="{cycle values="style1,style2"}">...</div>

That simple. You can have as many colours, or what I did was use that in the class tag for different styles for product displays.


So background of products could go:-

Black

White

Black

White



I like to use it anyway.

Jez
__________________
X-Cart 4.0.17
Reply With Quote