Quote from: happyavocado at Nov 04, 2008, 03:39 AM
Off topic...
Does anyone know how to instruct Wayfinder to output just the children of a container, and not the container/parent in a navigation?
i’ve posted this question on here already but have not had any answers, so thought i’d put it to you, Kongondo, as you have cleared up quite a few of my Wayfinder usses already!
Thank you in advance :)
Yes....the thing to remember is that normally WayFinder only lists the
descendants of the document specified in
&startId. The key here is the word descendants. That’s why stating
&startId=`0` will output all documents in the hierarchy - (there is no document with id=0) - i.e. the descendants of the root
(=0). So, back to your question, assume the following document hierarchy case (the numbers in brackets are document ids - but u know that, of course

):
Grand/Parent (40)
-------Parent (15)
-------------Grand/Child 1 (16)
-------------Grand/Child 2 (22)
-------------Grand/Child 3 (14)
-------------Grand/Child 4 (24)
If you specify
&startId=`15` Wayfinder will output a menu like so:
menu-------------grand/child 1 (16)
menu-------------grand/child 2 (22)
menu-------------grand/child 3 (14)
menu-------------grand/child 4 (24)
If you specify
&startId=`40` Wayfinder will output a menu like so:
menu-------Parent (15)
sub-menu-------------grand/child 1 (16)
sub-menu-------------grand/child 2 (22)
sub-menu-------------grand/child 3 (14)
sub-menu-------------grand/child 4 (24)
Bottom line, the document specified in
&startId is always
left out of the output unless you use the parameter
&displayStart, which is always used in concert with
&startItemTpl and in this case the value of
&startId must not be
Zero
The above assumes you are talking about one parent document/container. If on the other hand you had multiple parents with children and you wanted to leave out all the parents, this wouldn’t work. In this case you would use the parameter
&excludeDocs to exclude the parent documents.
Note that if you
"untick" "show in menu" for the parent document that is the
&startId, its descendants
will still be output. However, if you
"untick" "show in menu" for a parent document that is part of the menu (i.e. not the
&startId), its descendant documents, i.e. the children,
will also not be shown in the menu.
As usual, there’s probably another way of achieving these things....if there is, it will be pointed out here or somewhere else
Sorry for the longish post when a simple answer would have been enough. Just though I would make things clear, especially for the next person that comes along...

Hope this helps...all the above tested in modx 0.9.6.2
/k