Autonav hide top level if no children
Permalink
I want to display a mulitlevel nested list navigation using autonav, which is easily done.
But then I want to modify the template so that if a top level parent has no children it will not display in the list. Therefore only items with children will be displayed.
I've played around with getLevel() and getFirstChild() but can't get it to work.
But then I want to modify the template so that if a top level parent has no children it will not display in the list. Therefore only items with children will be displayed.
I've played around with getLevel() and getFirstChild() but can't get it to work.
Within the foreach loop (foreach($aBlocks as $ni) {
) add a line to check the number of children and 'continue' or skip if it's 0: