determine gallery depth level with smarty?

Ollibolli

Joined: 2005-12-20
Posts: 8
Posted: Tue, 2005-12-27 17:15

hello everyone,
is there a way to determine the level of an album? i can't find a suitable variable...

let's say there is a structure like this:

main gallery
|
|---- gallery#2
|
|---- gallery#3

how to check when main gallery is reached?
played around with childCount and childIds with no success :-(

bye

 
lvthunder

Joined: 2003-09-12
Posts: 804
Posted: Wed, 2005-12-28 21:19

If parentID=0 you are at the top.

 
Ollibolli

Joined: 2005-12-20
Posts: 8
Posted: Thu, 2005-12-29 14:54

thanks dude! :-)

 
sal
sal's picture

Joined: 2003-04-03
Posts: 3
Posted: Thu, 2006-02-02 02:28

I think you meant to say parentId.

 
temp

Joined: 2005-04-13
Posts: 16
Posted: Tue, 2006-07-04 14:21

Where can I find parentId?
{$parentId} does not work, how do I get the value in the smarty template?

 
lvthunder

Joined: 2003-09-12
Posts: 804
Posted: Tue, 2006-07-04 17:56

The variable is $theme.item.parentId. I'm not sure if when you are at the top if it is blank or if it is 0.