How to use pdo to make the tools menu in Modx?

How to use pdo tools to make such a menu? There was a problem with the classes li. Please tell me

<div class="menu" id="nsv1">
 <ul class="navbar-nav">

 <li class="nav-item active"><a class="nav-link" href="#hero">Home</a></li>
 <li class="nav-item"><a class="nav-link" href="#features">Features</a></li>
 <li class="nav-item"><a class="nav-link" href="#work">How It Work?</a></li>
 <li class="nav-item"><a class="nav-link" href="#process">Process</a></li>
 <li class="nav-item"><a class="nav-link" href="#download">Download</a></li>
 <li class="nav-item"><a class="nav-link" href="#pricing">pricing</a></li>
 <li class="nav-item"><a class="nav-link" href="#blog">Blog</a></li>
</ul>
</div>
March 19th 20 at 09:24
2 answers
March 19th 20 at 09:26
Solution
Hello, using pdoMenu - https://docs.modx.pro/komponentyi/pdotools/snippet...
There is a template example of paragraph - &tpl, in your case will be as follows:
&tpl=`@INLINE <li class="nav-item [[+classnames]]"><a class="nav-link" href="#[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`
I tried that but not working. Can you tell me where did I go wrong?

[[pdoMenu?
&parents=`0`
&outerClass=`navbar-nav`
&hereClass=`active`
&rowClass=`nav-item`
 &tpl=`@INLINE <li class="nav-item [[+classnames]]"><a class="nav-link" href="#[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`


 ]]
- Maximillia_Emmerich commented on March 19th 20 at 09:29
@Maximillia_Emmerich, well, that's the way it should work:
[[pdoMenu?
&parents=`0`
&outerClass=`navbar-nav`
&tpl=`@INLINE <li class="nav-item [[+classnames]]"><a class="nav-link" href="#[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`
]]

You can menu resources are not shown, check. - hildegard.Lehner commented on March 19th 20 at 09:32
Resources are accurately displayed. My styles still fly - Maximillia_Emmerich commented on March 19th 20 at 09:35
@Maximillia_Emmerich, Look in the code if the classes are correct, the problem is not pdoMenu - hildegard.Lehner commented on March 19th 20 at 09:38
Seems to be sorted out. Somehow everything fell into place when I removed # in front of link. Thank you! - Maximillia_Emmerich commented on March 19th 20 at 09:41
March 19th 20 at 09:28
Understood. Thank you very much - Maximillia_Emmerich commented on March 19th 20 at 09:31

Find more questions by tags MODX