Friday 20 July 2007 2:41:44 pm
i'm trying to add a list of the four newst folders in my gallery. I'm going to put the code in the frontpage override. I have been using this code for showing the latest folders made in the gallery section:
{def $nodes=fetch( 'content', 'list',
hash( 'parent_node_id', 178,
'depth', 1, 'limit', 4 ) )}
{foreach $nodes as $node}
<a href="{$node.url}"> {$node.name|wash}</a> <br />
{/foreach}
So this part works. What I want to do is to show the newest folders, but in stead of showing just the link I want to show a random picture form that folder. A the nature gallery should get a random picture from its own gallery, the same goes for the other ones. The random picture is not so important, but every album should have its own picture. Is this possible, and if, how can I solv this? - Alexander
|