Is there any way to determine the level deep in the resource tree for a resource via an extra. I am developing a template that will use the IF or SWITCH extra to determine what chunk to use.
Depending on the level deep I will use different pdoMenu calls for navigation.
For example in pseudo code:
[[!If?
&subject=`DEPTH`
&operator=`EQ`
&operand=`1`
&then=`[[$Level-1-chunk]]`
&else=`[[$Level-2-chunk]].`
]]
The chunks will have pdoMenu calls with different parameters passed to the snippet such as classes and/or tpl chunks.
Thanks
Roy
If you are using this inside a pdoMenu loop you’ll probably want to pass the menu item resource id to the snippet instead of getting the current resource id - for example:
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.