Forums / Setup & design / loop the object / Comment17170
Tobias Persson
Sunday 26 December 2004 11:05:30 pm
I meant like this:
{let randomised_array=fetch('content','tree', hash('parent_node_id', '76', class_filter_type, "include", class_filter_array, array(2)))|shuffle} {$randomised_array|attribute(show)} {/let}
Seems like you need to check out the docs for fetch function ;-) Here are some explanation in my own words:
The 'array(2)' is combined with the class_filter_array that stands infront of it. (ie class_filter_array=array(2)). In all it means that the fetch will just include content that has the class id = 2 . You need to check what class the object you want to loop has.
The 'tree' is the type of fetch you want to do. The tree-type-fetch grabs all content below parent_node_id including content in sub-folders.
Check out the docs for fetch and you will find more alot more info (and probably better explained ;-) ) http://www.ez.no/ez_publish/documentation/reference/data_fetching/content