navigation - When creating a nav in SilverStripe, what is the number after $Menu? -
the below template code 1 of tutorials on official silverstripe website ("how create navigation menu") includes template variable $menu(1)
what (1) mean? happens if gets changed else?
<ul> <% loop $menu(1) %> <li> <a href="$link" title="go $title page" class="$linkingmode"> $menutitle </a> ... </ul>
from docs
<% loop $menu(1) %> begins loop through menu items, repeating html in loop each one. passing (1) argument, asking cms give pages @ level 1 of hierarchy. changing (2) give pages @ second level of hierarchy in current section, , on.
that's taken video tutorials have now
Comments
Post a Comment