Sitemap
sitemap()
Renders a sitemap.
Supported wrapperClasses:
- pfy-nav-horizontalhorizontal navigation menu
- pfy-nav-indentedsub-elements get hierarchically indented
- pfy-nav-collapsedsub-elements are initially collapsed and can be opened
- pfy-nav-collapsiblesub-elements are initially open and can be collapsed
- pfy-nav-hoveropensub-elements opened on mouse over
- pfy-nav-open-currentnav tree is pre-opened down to the current page, the rest is collapsed
- pfy-nav-animatedadds an animation effect when opening/closing
- pfy-nav-coloredapplies some default coloring
Arguments
- type
- [branches]. (default: )
- id
- Id applied to the Nav element. (default: )
- class
- Class applied to the Nav element. (default: )
- wrapperClass
- Class applied to the Nav's wrapper. (default: )
- options
- [collapsible,collapsed] Adds corresponding classes to the wrapper (for convenience). (default: )
- listTag
- [ul,ol] The tag to be used in list of nav-elements. (default: ol)
Examples
Horizontal Sitemap
.pfy-sitemap-horizontal {
--pfy-nav-elem-bg-color: #efe;
nav > ol {
gap: 10px;
}
}
{{ sitemap(horizontal) }}
Vertical Sitemap
.pfy-sitemap {
--nav-base-color1: 0, 70%;
--nav-base-color2: 343, 35%;
}
{{ sitemap(wrapperClass:pfy-nav-colored) }}