I am developing a website that has a main navigation on top and then some different navigations in the right sidebar (here).
I am recalling them with Wayfinder and now I would like to display them in "Tree" structure in the sidebar.
For example for the Resource AVB(39) I have 2 under resources: "RESOURCE UNDER RESOURCE AVB #1" and "RESOURCE UNDER RESOURCE AVB #2".
How can I display them in a "Tree" structure? Something Like
AVB
- RESOURCE UNDER RESOURCE AVB #1
- RESOURCE UNDER RESOURCE AVB #2
This is my actual code:
[[!Wayfinder? &startId=`5` &level=`0`]]
You could do something like this.
Or if you are a few level deep then check out the UltimateParent snippet, which will allow you got a certain amount of levels up. https://modx.com/extras/package/ultimateparent
For example