vitamin2 / retrotree
Retrotree is a kirby 3 section plugin to display pages in real retro tree fashion.
Requires
- php: >=8.1.0
- getkirby/composer-installer: ^1.1
README
Retrotree is a kirby 3 section plugin to display pages in real retro tree fashion.
1. Installation
composer require vitamin2/retrotree
or:
- Create a folder named "retrotree" in site/plugins
- Clone/Copy the repo of this repository into it
2. Blueprint usage
The retrotree
section can replace any pages
section you have already set:
sections:
retrotree:
headline: Retro Tree
type: retrotree
2.1 Blueprint optionals
You can also set optionals
sections:
retrotree:
headline: Retro Tree
type: retrotree
treeMaxDepth: 5
treeDefaultIcon: page
treeEndMessage: no more entries
showContent: site
showStatus: true
showSlug: true
showPageIcon: false
enableTreeCollapse: true
toggleTextOpen: Collapse All
toggleTextClosed: Expand All
enableTreeDisplayDepth: false
2.2 optionals definition
Defines how many levels of subpages will be shown in the tree.
treeMaxDepth: 5
Defines the default tree icon set. https://getkirby.com/docs/reference/plugins/ui/icon
- page
- add
- or any other icon from the kirby-ui-kit
treeDefaultIcon: page
Message if no subpage is available:
treeEndMessage: no more entries
Define which content is shown in the tree:
- site = display the complete $kirby->site in the tree
- page = display the current $page in the tree
showContent: site
Shows page status in the tree:
showStatus: true
Shows page slug in the tree:
showSlug: true
Shows page icon in the tree, if any exists in the template. This will override the option "treeDefaultIcon"
showPageIcon: true
Shows expand/collapse option for each page with children. Also shows a global Expand/Collapse All button at the top right corner. Saves collapsed items in localStorage, so the state is the same if you logout/login or refresh the page. By default set to false.
enableTreeCollapse: true
If property 'enableTreeCollapse' is set to true, holds a custom button text for expanding all pages.
toggleTextOpen: Collapse All
If property 'enableTreeCollapse' is set to true, holds a custom button text for collapsing all pages.
toggleTextClosed: Expand All
Shows a number of child pages next to the parent page's title. By default set to true.
enableTreeDisplayDepth: false
3. Development
Follow step in the Kirby Docs. https://getkirby.com/docs/guide/plugins/plugin-setup-panel
- npm install -g parcel-bundler
- yarn global add parcel-bundler
- npm run dev
- npm run build
4. License
MIT
Please visit our website if you like this Plugin Vitamin2 AG
5. Credits
Contributors: