4 latest Album Names as menu links

zann

Joined: 2008-01-16
Posts: 2
Posted: Wed, 2008-01-16 23:02

Hi,

I am new to Gallery and can't seems to workout what I am doing wrong.
Basically I need to use the 4 latest albums as constant menu items.

I pulled together this code which manages to get the children of the album, so on the main page it works fine but when you drop down into a actual collection it starts to list all the children.

{foreach from=$theme.children item=child}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">{$child.title|markup}</a>
{/foreach}

I need to have the 4 latest albums listed as constants regardless of which level I am on.

I have seen people using code such as {elseif $smarty.foreach.parent.iteration ==2} to determine depth but I am not sure how to apply this to my problem.

Please help, I would be very greatful.

thanks.

 
zann

Joined: 2008-01-16
Posts: 2
Posted: Tue, 2008-01-22 11:09

can someone please help me out?

surely what I am trying to do isn't that hard.