Hi, after some test I have finally got this working. This is what I have done:
1. Create a Template Variable with the following values:
TV Name:
dropdown-menu
TV Description:
Show Dropdown Menu?
TV Type:
DropDown List Menu
Input Option Values:
Yes==0||No==dropdown-none
2. Now add &rowTpl=`chunkname` to your wayfinder snippet call:
[[Wayfinder? &rowTpl=`chunkname` &parentClass=`dropdown`]]
3. Now go to "chunkname" chunk and put a code similiar to this one:
<li class="[+wf.classnames+] [+dropdown-menu+]">
<a href="[+wf.link+]">[+wf.linktext+]</a>
[+phx:if=`[+dropdown-menu+]`:is=`dropdown-none`:then=``:else=`[+wf.wrapper+]`+]
</li>
4. Now, open a resource in the root of your website which has children, set the dropdown for the TV previously created to "No", and then save.
MODX will apply a "dropdown-none" class to the <li> tag of that resource, so basically we can hide arrows or whatever we use to indicate that there is a dropdown menu, using just css. The PHx call will also stop the output for the second level of the menu in the html, so we don't have to hide it with css.
Important: remember that you have to put [+dropdown-menu+] placeholder
before the PHx Call, if you remove it PHx will not work.
[ed. note: microcipcip last edited this post 12 years, 9 months ago.]