Thursday 06 November 2003 12:07:07 am
Of course it can be done For example:
{let noOfArticles=fetch(content','list_count', hash('parent_node_id',2,'class_filter_array',array(2),'class_filter_type','include'))} {/let} will count all the articles directly below the root node. Consult the documentation of the fetch function for further possibilities and the correct syntax Once you've got the number of articles you could test whether it's even or not using the mod function mod(16, 2) will return 0, mod(13,2) will return 1 To know which element you're handling inside the loop consider one of these
* index - is a number which starts at 0 and increases for each iteration.
* number - same as index but starts at 1
* key - if an array is iterated the key of the current item is set, if a number it will be the same as item * item - if an array is iterated the current item is set, if a number the current iteration index is set (same as index) Consult the section documentation page for more about these hth Tom
|