Search code examples
modxmodx-revolution

How to make parent items to be displayed in a dropdown menu?


There is a menu created with pdoMenu. Each parent item must be present in a dropdown menu as well. For instance "О компании" must include "О компании" as the first element of a submenu. Is there a way to make it with pdoMenu?

 [[pdoMenu?
&parentClass=`dropdown`
&innerClass=`dropdown-menu`
&level=`2`
&parents=`0`
&startId=`0`
&lastClass=`0`
&firstClass=`0`
&tplInnerRow=`@INLINE <li [[+classnames]]"><a href="[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`]]

Solution

  • https://docs.modx.pro/komponentyi/pdotools/snippetyi/pdomenu

    Play with &tplParentRow &tplParentRowHere &tplParentRowActive chunks and you'll gain success