Good Morning! I live in Brazil, and I'm a beginner in Modx. I'm loving this platform. I've tried many more and none of them compare to Modx. I would like your help in creating a menu. I have PdoMenu installed and I want to know how to use it in this code.
Moli montez
The code:
<nav>
<ul>
<li class="active">
<a href="#">Home</a>
</li>
<li>
<a href="#">Pages</a>
<ul class="mega-menu-area">
<li>
<a href="about1.html">About 1</a>
</li>
<li>
<a href="lecturers1.html">lecturers 1</a>
</li>
</ul>
</li>
<li>
<a href="#">Courses</a>
<ul>
<li>
<a href="courses1.html">Courses 1</a>
</li>
</ul>
</li>
<li>
<a href="#">Research</a>
</li>
<li>
<a href="#">News</a>
<ul>
<li class="has-child-menu">
<a href="#">News</a>
<ul class="thired-level">
<li>
<a href="news1.html">News 1</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Gallery</a>
</li>
<li>
<a href="#">Contact</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
[ed. note: moli123456 last edited this post 9 years, 6 months ago.]
Welcome to MODX
To learn how pdoTools does the job its better to try it yourself using the manual of pdoMenu. See
https://docs.modx.pro/en/components/pdotools/snippets/pdomenu
Codeplaza Webdesign: for professional websites at low cost
Hello! Thanks for the reply, but not following some manuals on the internet, I could not make this menu work. I'd be grateful if someone would help me with that.
Just this should be fine:
[[pdoMenu?
&parents=`0`
&level=`3`
]]
Then you
*should* really use CSS selectors rather than relying on classes and crowding your markup.
li:nth-child(2) ul { /* Mega Menu Style */}
But you can use class params on this page to inject your classes into the markup if its necessary:
https://docs.modx.pro/en/components/pdotools/snippets/pdomenu
You've also got 4 closing </div>'s at the bottom of your mark up by the way - i assume that could be part of some opening wrappers before the nav though?
Hello LK, thank you for your willingness to respond. Without changing the css, tell me how to set marking in html. Because I prefer to use the markings. If you can, please mark me so that I can study, as I am a beginner in Modx.
Thank you!