$child properties -- Any docs?

shinta
shinta's picture

Joined: 2005-02-18
Posts: 24
Posted: Fri, 2006-02-24 17:48

Hello, I'm trying to make the title of albums display the number of photos within the album. I'm hoping there's a $child property for this, i.e. $child.count or something. So, for example, in my template I would have:

{g->text text="%s<br />(%s photos)" arg1=$child.title|markup arg2=$child.count}

Of course, $child.count doesn't exist, so I was wondering if there's any documentation that lists out all the $child properties we can use.

Thanks!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2006-02-24 18:02
 
shinta
shinta's picture

Joined: 2005-02-18
Posts: 24
Posted: Fri, 2006-02-24 19:08

Awesome, thanks! child.childCount is the property I'm looking for.
BTW, I did come accross that first link during my search, but couldn't find the information I needed on that page. The second link, however, has the answer.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2006-02-24 20:39

The tip in the first link is the third bullet in the first section: "To see all variables available for a page...."

 
shinta
shinta's picture

Joined: 2005-02-18
Posts: 24
Posted: Fri, 2006-02-24 22:41

That's very helpful. Thanks again! :)