Page Count

Permalink Browser Info Environment
Hi There

I need the parent nav to show a page count of all pages that exist beneath it. I got help in the forums from bbeng89 to enable that for the standard autonav block. I would like to incorporate it in with your add on.

Would you be able to assist in incoporating the below to work?

foreach ($navItems as $ni) {
   $numChildren = $ni->cObj->getNumChildren();
   echo '<li class="' . $ni->classes . '">'; //opens a nav item
   echo '<a href="' . $ni->url . '" target="' . $ni->target . '" class="' . $ni->classes . '">' . $ni->name . ($numChildren > 0  ? ' (' . $numChildren . ')' : '') . '</a>';
   if ($ni->hasSubmenu) {
      echo '<ul>'; //opens a dropdown sub-menu
   } else {
      echo '</li>'; //closes a nav item
      echo str_repeat('</ul></li>', $ni->subDepth); //closes dropdown sub-menu(s) and their top-level nav item(s)
   }
}

Type: Discussion
Status: Resolved
agentorange
View Replies:
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
Hi,

Are you able to let me know which version of Concrete5 you're using please so I can ensure we're both on the write page when getting this working?

Thanks,
Chris Watterston
agentorange replied on at Permalink Reply
agentorange
Hi

I am using 5.6.2.1

Thanks M
agentorange replied on at Permalink Reply
agentorange
Hi Chris

Have you had a chance to look at this?

I look forward to your response.
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
New release will include such feature(s). Expected early 2015!
Cheers.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.