Random image - shuffle

Random image - shuffle

Thursday 21 April 2005 5:26:57 am - 4 replies

Author Message

Xavier Dutoit

Thursday 21 April 2005 9:42:40 am

Hi,

Have you tried with the parent_node_id set to 51 (media/images) ?

then use an embed view (by default, it displays the image.

X+

http://www.sydesy.com

Niklas Gunnäs

Friday 22 April 2005 3:18:35 am

This code shows random image from folder 73. If I change it to 51 it shows nothing. Why?

{let randomised_array=fetch('content','tree', hash('parent_node_id', '73',
						class_filter_type, "include", class_filter_array, array(5)))|shuffle}
{section name=random loop=$randomised_array max=1}
<img src={$random:item.object.data_map.image.content[medium].full_path|ezroot} border="0">
{/section}
{/let}	

Felix Laate

Friday 22 April 2005 4:24:35 am

Hi Niklas!

Permission issue? Anonymous users need "read" permission to the media section (or at least the folders where your images are)

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Niklas Gunnäs

Friday 22 April 2005 5:37:52 am

Thanks Felix

You made my day....

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.