| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Alternate row colours | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Alternate row colours
If you want the product list to show up in alternate colours this can be done by changing the customer/main/products.tpl template.
Change: Code:
Code:
Then set up two styles alternate1 and alternate2 in skin1.css like: Code:
__________________
ex x-cart guru |
|||||||
#3
|
|||||||
|
|||||||
Smarty has a built in function for alternating row colors!
<tr bgcolor="{cycle values="#F3F3F3,#FFFFFF"}"> Code:
|
|||||||
#4
|
|||||||
|
|||||||
Does it do alternative styles?
__________________
ex x-cart guru |
|||||||
#5
|
|||||||
|
|||||||
Yes it will!
<tr class="{cycle values="alternate1,alternate2"}"> http://smarty.php.net/manual/en/language.function.cycle.php |
|||||||
#6
|
|||||||
|
|||||||
must have missed that bit when I refer to smarty.php.net Thanks for pointing it out.
__________________
ex x-cart guru |
|||||||
#7
|
|||||||
|
|||||||
In fact you can specify as many colors to cycle through as you want (e.g. <tr class="{cycle values="alternate1,alternate2,alternate3,alternate X"}">). It's pretty sweet.
|
|||||||
#8
|
|||||||
|
|||||||
smarty is
__________________
ex x-cart guru |
|||||||
#9
|
|||||||
|
|||||||
Like I said
Like I said usually somthing I want to is already asked and I can just find it here. Like this feature. Will try it now.
John |
|||||||
#10
|
|||||||
|
|||||||
One Problem
One problem
How can I use this mod to change the way it displays the product description in the product.tpl. I'd like one line to be one color and the next the other and visa versa. Thanks |
|||||||
|
|||
X-Cart forums © 2001-2020
|