Navigation

breadcrumbs
Creates the markup for a breadcrumb trail to the current page.
nav
Creates a simple HTML list as navigation below a given page. This method basically serves as a shorthand version of a foreach loop iterating a pagelist of type "children".
navChildren
This method is a shorthand version for the nav method, using the current page as the parent context.
navSiblings
This method is a shorthand version of the nav method, using the parent page of the current page as the parent context. The included pages are therefore all siblings of the current page.
navTop
This method is a shorthand version of the nav method, using the homepage page as the parent context.
navTree
Generates the HTML for a full site tree. This method can be used as a shorthand for recursively iterating over pagelists to create nested lists of page links.
newPagelist
Creates a new pagelist object. The current pagelist will be replaced. A foreach loop can be used to iterate the pagelist object. This method does not have any output. To only update the configuration of the current pagelist, without resetting all other parameters, the pagelist method can be used instead.
pagelist
Modifies the currently defined pagelist object. Only specified options will be changed, all others will be preserved. To restore a default pagelist and reset all options, the newPagelist method can be used.
redirect
Redirects the current page to a given URL.
Pagelist
The pagelist contains by default all pages that are not hidden and has no specific type. Changing the type of the pagelist updates the selection of pages accordingly. The main purpose of the pagelist is to provide an easy way of iterating a defined set of pages using a foreach loop, for example to build navigations, blog indexes, search results or lists of related pages.
Recurisve Navigations
Navigations and menus are an essential part of any website. Automad provides convenient ways to iterate the pages of a site recursively and therefore allows for creating site trees in a few simple steps. For simple cases, the navTree function generates a complete tree in a single statement. In case you need full control over the generated markup, you can build your own tree using a recursive snippet. Conceptually, building such a tree can be divided into three steps.