Count page childs

Permalink
Hello all,

I was trying to get a total count of child pages for a page, for instance if i have a page called reports and within reports i have to more pages, new reports and old reports how can i get a total count of child pages for reports? i tried to look at the navigation block but all i see is the getlastlevel function that gives you the previous level count, but what I'm trying to do is get the count for each page, so i can show them this way "Reports - 2 pages" is there a way to do this?

Thanks to all in advance.

 
Zelgadis replied on at Permalink Reply
Hi!
$page->getNumChildren() will do a trick for you.