Question

I have the following Wayfinder call:

[[Wayfinder? &startId=`0` &level=`0` &includeDocs=`5,6,7,11,12`]]

This should show the links to the listed resources, which are kept in a parent resource. However, they do not. They only way I can get it to work is to include the parent resource as the startId:

[[Wayfinder? &startId=`3` &level=`0` &includeDocs=`5,6,7,11,12`]]

This is ok if the resources are all under one parent, but I have a variety of resources on a variety of levels and parents that I can not display.

Does anyone know what I am doing wrong?

Was it helpful?

Solution

If you specify includeDocs it will only list those docs, so you'll need to either set startId to your parent or include the neccessary parents in the includeDocs call.

(Line 539 in wayfinder.class.php: )

/* if set, limit results to specific resources */
if (!empty($this->_config['includeDocs'])) {
    $c->where(array('modResource.id:IN' => explode(',',$this->_config['includeDocs'])));
}

OTHER TIPS

http://rtfm.modx.com/extras/revo/wayfinder - did you see docs?

&level - Depth (number of levels) to build the menu from. '0' goes through all levels. 

if you wanna exclude some documents - just use &excludeDocs property or filter &where, as

&where=`[{"template:!=": "4"}]` 

( get all docs except with template "4"). Docs of where condition - http://rtfm.modx.com/xpdo/2.x/class-reference/xpdoquery/xpdoquery.where

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top