Looping Children

SS 4.1

Is there an additional class that I need to use for looping through $Children pages in a menu? $Menu(1) works as expected, but I’m not getting any $Children. And to state what should be obvious, I did create child pages and they are published and are set to show in menu.

<% loop $Menu(1) %>
    <li class="{$LinkingMode}"><a class="{$LinkingMode}" href="{$Link}" title="{$MenuTitle}">$MenuTitle</a></li>
    <% if $isSection %>
        <% if $Children %>
            <ul class="header__nav--sub">
                <% loop $Children %>
                    <li class="{$LinkingMode}"><a class="{$LinkingMode}" href="{$Link}" title="{$MenuTitle}">$MenuTitle</a></li>
                <% end_loop %>
            </ul>
        <% end_if %>
    <% end_if %>
<% end_loop %>

Considering you have children, maybe a stupid question, but is $isSection true?

Well…other than removing my embarrassingly obvious html structure error in the code above, removing the $isSection worked.

When I doscovered $Menu(2) didn’t work I followed this tutorial: https://docs.silverstripe.org/en/4/developer_guides/templates/how_tos/navigation_menu/.

Regardless, apparently $isSection was not true and I must have misunderstood that tutorial.

Thanks for suggesting $isSection wasn’t true.