Third level navigation in the PyroCMS navigation bar

I'm having problems creating a third-level navigation bar in PyroCMS, I don’t have two levels that work fine, but for some reason it won’t let me double-view the {{navigation}} array.

This is what I have:

{{ navigation:links group="header" }} {{ if children }} <li class="dropdown"> <a href="{{url}}" class="dropdown-toggle" data-toggle="dropdown">{{ title }} <b class="caret"></b></a> <ul class="dropdown-menu"> {{ children }} {{ if children }} <li class="divider"></li> <li class="nav-header">{{ title }}</li> {{ children }} <li><a href="{{url}}">{{ title }}</a></li> {{ /children }} {{ else }} <li><a href="{{url}}">{{ title }}</a></li> {{ endif }} {{ /children }} </ul> </li> {{ else }} <li {{ if class == 'current' or class == 'first current' or class == 'last current' }}class="active"{{ endif }} ><a href="{{url}}">{{ title }}</a></li> {{ endif }} {{ /navigation:links }} 

I assume that “children” cannot be looped twice, if so, what is the correct way to do this work?

Thanks!

+4
source share
1 answer

After some time, I found out that you can use the following lex tag:

 {{ *recursive children* }} 

But you cannot customize the look using this tag. And you cannot use child elements in a child loop.

+2
source

Source: https://habr.com/ru/post/1416156/


All Articles