statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Nav: if children -> recursive children not work #2482

Open ErdincKocak opened 4 years ago

ErdincKocak commented 4 years ago

I have a multi-level-navigation with 3 levels and try to output all nav-items. I have a problem with the third level.

{{ if children }}
  <ul class="main-nav">{{ *recursive children* }}</ul>
{{ /if }}

doesn't work. There is no output.

I want to show all three levels.

Environment details:

dannyuk1982 commented 4 years ago

Have you definitely set max_depth to 3 in the nav tag? As this defaults to 2 if you don't specify otherwise.