demaxim Posted July 21, 2013 Share Posted July 21, 2013 Hi, does anyone knows how to add unique class for each third category in list, like for product works <li class="{if $smarty.foreach.products.iteration is div by 3} product_list-3{/if}"></li> thanks Link to comment Share on other sites More sharing options...
vekia Posted July 21, 2013 Share Posted July 21, 2013 use something like this: {if $smarty.foreach.VARIABLE.iteration%3 == 0}product_list-3{/if} Link to comment Share on other sites More sharing options...
demaxim Posted July 21, 2013 Author Share Posted July 21, 2013 i try to use {if $smarty.foreach.VARIABLE.iteration%3 == 0}product_list-3{/if} {if $smarty.foreach.subcategory.iteration%3 == 0}product_list-3{/if} {if $smarty.foreach.subcategories.iteration%3 == 0}product_list-3{/if} not working, class adds to every <li> Link to comment Share on other sites More sharing options...
Recommended Posts