📜 ⬆️ ⬇️

Wayfinder in examples

This document contains answers to the most frequently asked questions about the organization of the menu in Wayfinder. Newcomers recommended!

Simple call option


[[Wayfinder? & startId = `15`]], where 15 is the folder from which
we need to display documents in the menu

Using


When the menu is displayed for a specific section. For the main
menu site is used exactly this option.

The resulting menu code


Unnumbered list.
')

Notes



Child documents


[[Wayfinder?
& startId = `[* id *]`]], where [* id *] is automatically replaced
on the current document ID.

Using


When displaying internal subsections of the current section
site. Can be used inside the page content.

The resulting menu code


In the form of an unordered list.

Note


If the current page does not contain child documents, then
the menu is not displayed (including the code of the opening list)

Neighboring documents / sections


[[Wayfinder?
& startId = `[* parent *]`]], where [* parent *] is automatically replaced
Parent ID
current document.

Using


When displaying documents that are in the same
section as the current document.

The resulting menu code


Unnumbered list.

Note


[* parent *]
at the main page is 0.

Site Map


[[Wayfinder? & startId = `0`]]

Using


To display all documents of the site that are marked for
output in the menu.

The resulting menu code


Multi-level unnumbered list.

Note


Check the results for documents that are not
displayed in the main menu, but can get into the site map. Since the tick
“Show in menu” is on by default, you can accidentally skip
official documents (search results, page 404, RSS, etc.)

Menu icons


In the & rowTpl template
add code where [+ wf.docid +] after processing
replaced by ID
document. Thus, for each specific document we can specify
your icon.

Notes



Additional links




Ask additional questions here or on the forum modx-cms.ru

Source: https://habr.com/ru/post/17826/


All Articles