Hi!
In my Template I use a menu which should show some shortcuts to documents specified by a TV. It is possible to choose ANY document of the site, no matter which parent it has.
An example would be:
[!Wayfinder? &startId=`1`&includeDocs=`2,5,6` &ignoreHidden=`true` &sortBy=`published`!]
In this case the document-tree looks like:
id1
|-id2
| |-id3
|-id4
|-id5
|-id6
The output only includes the document id2 ... if I change to &startId=`4` it will not show document id2. Any ideas how to solve this problem? Is there an option "ignoreParent"?
Thank you for your help ...
Tobias
Wayfinder 2.0 – ModX 0.9.6 RC1
[EDIT]
My solution for this Problem: hacking Wayfinder
I changed following Lines in wayfinder.raum.inc.php
Line 314
$fields = "sc.id, sc.menutitle, sc.pagetitle, sc.introtext, sc.menuindex, sc.published, sc.hidemenu, sc.parent, sc.isfolder, sc.description, sc.alias, sc.longtitle, sc.type,if(sc.type='reference',sc.content,'') as content, sc.template, sc.link_attributes";
changed to
$fields = "sc.id, sc.menutitle, sc.pagetitle, sc.introtext, sc.menuindex, sc.published, sc.hidemenu, sc.isfolder, sc.description, sc.alias, sc.longtitle, sc.type,if(sc.type='reference',sc.content,'') as content, sc.template, sc.link_attributes";
Line 325-327
if ($this->_config['includeDocs']) {
$menuWhere .= " AND sc.id IN ({$this->_config['includeDocs']})";
}
changed to
if ($this->_config['includeDocs']) {
$menuWhere .= " AND sc.id IN ({$this->_config['includeDocs']})";
} else {$fields .= ', sc.parent';}
now Wayfinder ignores parent when you use includeDocs ...
[/EDIT]