PageFactory (Kirby Plugin)

Sitemap

sitemap()

Renders a sitemap.

Supported wrapperClasses:

  • pfy-nav-horizontalhorizontal navigation menu
  • pfy-nav-indented sub-elements get hierarchically indented
  • pfy-nav-collapsed sub-elements are initially collapsed and can be opened
  • pfy-nav-collapsible sub-elements are initially open and can be collapsed
  • pfy-nav-hoveropen sub-elements opened on mouse over
  • pfy-nav-open-current nav tree is pre-opened down to the current page, the rest is collapsed
  • pfy-nav-animated adds an animation effect when opening/closing
  • pfy-nav-colored applies 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) }}