Autonav levels not working as expected
Permalink
If I hardcode in the autonav with a template, it shows all levels, even if I choose custom with one level for the subpage levels. Also, I've noticed that $ni->level is not working in the template itself. particularly if I try something like:
Actually it seems that the system is not accepting "&&" in the autonav template at all.
Am I checking this wrong?
Actually it seems that the system is not accepting "&&" in the autonav template at all.
Am I checking this wrong?
For me the following works:
if ($ni->hasSubmenu && $ni->level >= 2) { echo '<ul>'; } elseif ($ni->hasSubmenu){ echo '<ul class="dropdown m-menu">'; //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) } }
I'm stuck with the same problem.