Menu
Use the menu helper to render menus.
Arguments
StringThe menu identifier.
Parameters
listFlag to list directory content (default:false).include-indexInclude the index file when listing directory content (default:false).depthMaximum depth when listing directory content (default:1).pathOptional directory to list.
info
Use depth=0 to get all the descendants of a folder; the listing will use the default maximum folder depth for traversal which is 64.
Local Variables
@self: Set totruewhen a path matches the current page.
Example
Render a named menu:
Render a menu of pages in the current folder excluding the index page:
Render a menu of pages in the current folder and include the index page:
Render a menu including all the descendants of the current folder upto the the maximum depth:
Iterate the pages in a menu and exclude the current page:
Iterate the pages in the current folder (list=true is inferred):
Iterate all the pages in a specific folder upto the maximum folder depth: