A page-explorer is a navigational component that creates a navigation bar in the form of:
This component is mostly used in a side slot.
A default page-explorer list pane can be asked with this minimal markup (the width options is cosmetic and can be deleted)
By default, the list will show the pages of the namespace from the requested page.
<page-explorer width="300px"></page-explorer>
and will look like this where the label for each page is the page name
A page-explorer tree does not need any template definition.
<page-explorer tree ns=":docs:layout"></page-explorer>
<page-explorer color="blue" height="250px" width="400" scroll="toggle">
<parent>[[$path|<icon name="arrow-left-box"/> ... ${h1 | cut("-","2-") | trim()} ]]</parent>
<page>[[$path|<icon name="file"/> ${h1 | cut("-","2-") | trim()} ]]</page>
</page-explorer>
where the page template is composed of:
Example:
<page-explorer tree ns=":docs:layout">
<index>[[$path|<icon name="home" color="#0000004d" width="20"/> Overview]]</index>
<ns>${h1 | cut("-","2-") | trim()}</ns>
<page>[[$path|<icon name="file" color="#0000004d" width="20"/> ${h1 | cut("-","2-") | trim()}]]</page>
</page-explorer>
where the page template is composed of:
It produces:
<page-explorer type ns="namespacePath">
<page>template</page>
<namespace>template</namespace>
<index>template</index>
<parent>template</parent>
</page-explorer>
where:
Attribute | Default | Possible Values | Description |
---|---|---|---|
type | list | list or tree | It defines the layout |
ns | the rendered page for a list the physical page for a tree | It defines the namespace that should be rendered |
page-explorer, index, page, parent and namespace are all superset HTML component.
The templates define the output of each node in the list or tree layout:
The below image shows you the mapping between the tag and their location in a list layout.
The below image shows you the mapping between the tag and their location in a tree layout.
If a sub-element (index, parent, namespace) is defined without any template (ie empty content), they are not shown.
[[$path|$name]]
<!-- For a list -->
[[$path|<icon name="mdi:folder"/> $name]]
<!-- For a tree -->
$name</pipeline>
[[$path|<icon name="icons8:level-up"/> $name]]
The page-explorer tree is recreated when:
If your tree has a lot of pages, it may seems slow: