在 SilverStripe 中创建导航时,$Menu 后面的数字是多少?

When creating a nav in SilverStripe, what is the number after $Menu?

以下来自 SilverStripe 官方网站 ("How to create a navigation menu") 教程之一的模板代码包含模板变量 $Menu(1)

(1) 是什么意思?如果它被更改为其他内容会怎样?

<ul>
    <% loop $Menu(1) %>
        <li>
            <a href="$Link" title="Go to the $Title page" class="$LinkingMode">
                $MenuTitle
            </a>
...
</ul>

来自文档

<% loop $Menu(1) %> Begins a loop through all the menu items, repeating all the HTML that is in the loop for each one. By passing (1) as an argument, we are asking the CMS to give us all the pages at level 1 of the hierarchy. Changing that to (2) would give us all the pages at the second level of the hierarchy in the current section, and so on.

这是取自 video tutorials 他们现在