📜 ⬆️ ⬇️

Wayfinder options

Description


Serves to organize the menu. Allows you to organize simple,
multi-level and drop-down menus.
Through the use of a pattern, the result can be displayed as
numbered and unordered lists or any other.

Consider the options that Wayfinder has. The specified parameters refer to the first version.

The authors



Version


2.0

Call examples


[[Wayfinder? & startId = `0`]]
')
[[Wayfinder?
& startId = `0` & level =` 3` & hideSubMenus = `1` & outerTpl =` wfOuter`
& rowTpl = `wfRow` & hereTpl =` wfHere`]]

Options


& startId


ID of the folder from which documents are taken for
formation of the result.

Values: Any number (ID) of the document.

Default: Current Document

& level


The number of levels in depth to collect documents.

Value: an integer greater than or equal to zero.

Default: 0

& ignoreHidden


Ignore the "Show in menu" checkbox and display such
documents too.

Values:


Default: false

& ph


The name of the variable that will be used for output
result (?)

Values:


Default: false

& debug


Set debug mode for diagnostics.

Values:


Default: false

& hideSubMenus


Display only active menus.

Values:


Default: false

& removeNewLines


Remove the newline character in the output (?).

Values:


Default: false

& textOfLinks


The field used to name the menu link.

Values:


Default: menutitle

& titleOfLinks


The field used for the menu's title link.

Values:


Default: pagetitle

& rowIdPrefix


Set a unique identifier (id) for each element (id is added
from rowIdPrefix + docId).

Values:


Default: false

& useWeblinkUrl


Link to variable [+ wf.link +].

Values:


Default: true

& showSubDocCount


Print the number of documents in a folder to a variable
[+ wf.subitemcount +].

Values:


Default: false

& sortOrder


Sets the sorting order for documents.

Values:


Default: ASC

& sortBy


The field by which the sorting takes place.

Values:


Default: menuindex

Menu templates


& outerTpl


Sets the menu output template.

Meaning: The name of the chunk to be used.

Possible variables:


Example:
<ul id = "topnav" [+ wf.classes +]> [+ wf.wrapper +]

& rowTpl


Sets the display pattern for a range of menus.

Meaning: The name of the chunk to be used.

Possible variables:


Example:
<li [+ wf.id +] [+ wf.classes +]> <a href = "[+ wf.link +]"
title = "[+ wf.title +]" [+ wf.attributes +]> [+ wf.linktext +] [+ wf.wrapper +]

& parentRowHereTpl


Sets the output template for the current item, if it is a folder.

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example:
<li [+ wf.classes +]> <a href = "[+ wf.link +]"
title = "[+ wf.title +]"> [+ wf.linktext +] »[+ wf.wrapper +]

& parentRowTpl


Sets the output template for all documents that are
folders.

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example:
<li [+ wf.classes +]> <a href = "[+ wf.link +]"
title = "[+ wf.title +]"> [+ wf.linktext +] »[+ wf.wrapper +]

& hereTpl


The output template for the current document.

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example:
<li [+ wf.classes +]> [+ wf.linktext +] [+ wf.wrapper +]

& innerTpl


Template for all the list of all subfolders.

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example:
<ul [+ wf.classes +]> [+ wf.wrapper +]

& innerRowTpl


Template for a number of submenus.

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example:
<li [+ wf.classes +]> <a href = "[+ wf.link +]"
title = "[+ wf.title +]"> [+ wf.linktext +] [+ wf.wrapper +]

& innerHereTpl


The template for the current document, if it is a subfolder.

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example:
<li [+ wf.classes +]> [+ wf.linktext +] [+ wf.wrapper +]

& activeParentRowTpl


Template for displaying subfolders that are ancestors
current document.

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example:
<li [+ wf.classes +]> <a href = "[+ wf.link +]"
title = "[+ wf.title +]"> [+ wf.linktext +] [+ wf.wrapper +]

& categoryFoldersTpl


Template for displaying the category folder. Category folder
set by setting a blank template or link attribute
rel = "category".

Meaning: The name of the chunk to be used.

Possible variables: like & rowTpl

Example: <li [+ wf.classes +]> <a href = "[+ wf.link +]"
title = "[+ wf.title +]"> [+ wf.linktext +] [+ wf.wrapper +]

Name of assignable CSS classes


& firstClass


CSS class
for the first item of the current menu level.

Value:


Default value: none (absent)

& lastClass


CSS class
for the last item of the current menu level.

Value:


Default value: last

& hereClass


CSS class
indicating the state of "you are here." Defines the entire chain of items.

Value:


Default value: here

& selfClass


CSS class
indicating the state of "you are here." Specifies only the current document.

Value:


Default value: none (absent)

& parentClass


CSS class
pointing menu item as a folder (has attached documents)

Value:


Default value: parent

& rowClass


CSS class
specifying each row of the menu.

Value:


Default value: none (absent)

& levelClass


CSS class
defining each menu level. For each level can be set
special CSS class
(level1, level2, level3, etc.)

Value:


Default value: none (absent)

& outerClass


CSS class
for the menu output template.

Value:


Default value: none (absent)

& innerClass


CSS class
for the template output sub menu items.

Value:


Default value: none (absent)

& webLinkClass


CSS class
for menu links.

Value:


Default value: none (absent)

Connect CSS and Javascript to the menu


* & cssTpl


CSS
to add to the page.

Value:


Default value: false

* & jsTpl


Javascript to add to the page.

Value:


Default value: false


Link: Snippet Wayfinder 2

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


All Articles