-
☆ A M B ☆
- 24,524 Posts
Keep in mind that if your "red" container has multiple levels this won’t work; "grandchildren" will be using their parent, a child of "red".
Usually for this kind of thing I use a TV with @INHERIT as the default value, then in the parent resource (the one I want the menu built from) I edit the TV with its ID.
-
☆ A M B ☆
- 24,524 Posts
You have a structure like this
1
1.1
1.2
1.3
2
2.1
2.2
2.3
2.3.1
2.3.2
3
You want the menu of the 1. items to use 1 as its parent, the menu for 2. items (including 2.3 items) to use 2 as the parent. If you just use [*parent*], then 2.3.1 will use 2.3 as the startId, when you want it to use 2.
If you create a TV with @INHERIT, then for 1, 2 and 3 you edit it (1 for 1, 2 for 2, etc), then each one’s children will inherit the same value. So all of 1’s children will use 1 and all of 2’s children and grandchildren will use 2. When you use @INHERIT, you don’t edit the TV for any of the child resources, they inherit the value you set in their parent resource.
Possibly even better, if the parent resources in question are top-level resources, you can use the UltimateParent snippet. It returns the ID of the top-level parent. Just remember to alternate the snippet tags from uncached to cached (for Evo) [!Wayfinder? &startId=`[[UltimateParent]]`!]; you don’t have to worry about that for Revo.
Brilliant, many thanks
Sorry to ask again but my sticking point is I don’t know what you mean by editing the TV - edit in what way please?
Here’s the TV info:
Name: startTV
Input type: Text
Default Val: @INHERIT
The TV is applied to the required Template which will be applied across different containers.
This is my snippet call - [[Wayfinder? &startId=`[*startTV*]` ... ]] - but it got no joy
fyi, I’m using PHx in the site and have tried both cached and uncached.
Thanks