Hi,
THANK YOU!
Well I did this:
[[!Wayfinder? &startId=`[[UltimateParent]]` &level=`2` &outerClass=`sidemenu`]]
And... well, it "worked"!
I get it: UltimateParent returns the... well, ultimate parent of the page I am viewing. So I use WayFinder with *that* as the startId, and then level 2 so that it display the right level. Right on, it works
I was looking for the documentation of UltimateParent. From here:
http://modx.com/extras/package/ultimateparent
There are no actual instructions on how to use UltimateParent and how to use it.
In the Package Manager, within the MODX manager, I cannot see any instructions.
I found _some_ instructions in the package itself in the modNsipset folder:
@param &id The id of the document whose parent you want to find.\\n * @param &top The top node for the search.\\n * @param &topLevel The top level node for the search (root = level 1)\\n *\\n * @license Public Domain, use as you like.\\n *\\n * @example [[UltimateParent? &id=`45` &top=`6`]]\\n * Will find the ultimate parent of document 45 if it is a child of document 6;\\n * otherwise it will return 45.\\n *\\n * @example [[UltimateParent? &topLevel=`2`]]\\n * Will find the ultimate parent of the current document at a depth of 2 levels\\n * in the document hierarchy, with the root level being level 1.\\n *\\n * This snippet travels up the document tree from a specified document and\\n * returns the \\"ultimate\\" parent. Version 2.0 was rewritten to use the new\\n * getParentIds function features available only in MODx 0.9.5 or later.\\n *\\n * Based on the original UltimateParent 1.x snippet by Susan Ottwell\\n * <
[email protected]>.
Is this supposed to actually display somewhere in the GUI? It _is_ useful!
Quote from: frogabog at May 11, 2013, 02:10 PMDon't forget the &level property. &level=`0` shows all the children and their children. &level=`1` as you have it in the call would just show the first level so you'll want to use &level=`2` to get the immediate children of the parent.