In MyCashflow, it is possible to define CSS class names for list elements on different lists by using the classes and list_classes attributes.

The values given to the classes attribute are printed for all list elements on the product list. On the contrary, the list_classes attribute is enabled only if the product list's type attribute's value is 'list'. The attribute value is given to the element that contains the list (<ul> or <ol>, depending on the value of the list_type attribute used by some tags).

list_classes and classes are not enabled for all list tags. See the tags' dedicated pages for more detailed information about tag attributes.

It may often be useful to give distinctive class names to list elements – for example, if you want to highlight every other line on the product list. It is also possible to define class name attributes so that different class names repeat in list elements in a series, e.g. so that every second list element has a different class name.

The example below prints the product list of a product category, whereby the whole list is given the 'tuotelista' class name and the list elements are given class names that are repeated in series:

{CategoryProducts(
    type: 'list',
    list_type: 'ul',
    list_classes: 'productlist',
    classes: 'firstAndEveryFourth|everySecond everySecondsSecond|everyThird'
)}
<ul class="ProductList productlist">					
	<li class="ListProduct firstAndEveryFourth">...</li>
	<li class="ListProduct everySecond everySecondsSecond">...</li>
	<li class="ListProduct everyThird>">...</li>
	<li class="ListProduct firstAndEveryFourth">...</li>
	<li class="ListProduct everySecond everySecondsSecond">...</li>
	<li class="ListProduct everyThird>">...</li>
	<li class="ListProduct firstAndEveryFourth">...</li>
</ul>