[Wayfinder] &includeDocs doesn't work


There is something I don’t understand with Wayfinder.
I want to include severals docs on my main which are children of a specific doc container (which is not include on the main menu).

But if I’m using the &includeDocs with the ID of my resources, my main menu totally disapear from the front end.
There is my Wayfinder call :

[[!Wayfinder? &startId=`0` &level=`2` &includeDocs=`71,87,104` &rowTpl=`MenuItemTpl`  &debug=`1` &outerClass=`slimmenu` &innerClass=`sous-menu` &parentClass=`main-menu__item` &sortOrder=`ASC` ]] 

Nothing on the log, the debug mode on wayfinder don’t say evident thing :

If I leave empty the &includeDocs=`` the menu work as usual.

What is going wrong ?

This older thread could be helpful. Its the same behavior but its Evo not Revo.

There are two possible fixes there, one is multiple wayfinder calls, the other is a bit of code from Jako. It looks like perhaps its returning only those resources that are both in the parent and those docs…hey why not try to put the parent in that list on includedocs as well.


To include additional resources (without checking if they are visible, published, deleted, allowed for the current user etc.) you could try to add

&where=`1=1 OR sc.id IN (17,18,19,20)`

to the snippet call. Untested. 

also this https://stackoverflow.com/questions/28290277/wayfinder-includedocs-only-showing-first-level-reasources

&includeDocs in Wayfinder does exactly what you’re seeing – “Acts as a filter and will limit the output to only the documents specified in this parameter.”

If you want to give pdoMenu a try, the &resources property does what you’re after: “Comma-separated list of resources to add into the results.”


1 Like

Thank you for your anwsers @nuan88 and @lucy :slight_smile:
I will give a try to pdoMenu :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.