Friday 20 July 2007 2:41:44 pm - 3 replies
Łukasz Serwatka
Monday 23 July 2007 6:43:35 am
1. Fetch 4 items filtered on content class ('gallery' in your case) 2. Loop through fetch result array3. Display image as child of gallery object
{foreach ...} {* Inside foreach loop *} {def $rand_img = rand( 0, $item.children_count )} {attribute_view_gui attribute=$item.children[$rand_img].data_map.image} {undef $rand_img} {/foreach}
Of course you need to fix variable names up to your code.rand tpl operator is available since eZ Publish 3.8
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Alexander Davidsen
Monday 30 July 2007 5:49:30 am
Worked like a charm!
Thanks for your help!
Tuesday 31 July 2007 4:12:07 am
Great, you are welcome! ;)
You must be logged in to post messages in this topic!