Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Tips on implementing a "mega menu"
I’m thinking about trying to make a menu like this:
JA Purity II Example <— see “Explore” menu
Utah Travel Example <— See left side menu
Simple Mega Menu tutorial <— Really basic, but same idea, I think.
It’s a menu, but it does more than just list text items and basic icons. I’d like to explore the idea.
Is there any point to using Txp tags to do this? Or should I just plop the HTML in there?
Right now, my site menu is like this:
<txp:section_list active_class=“active” break=“li” class=“navmenu” include_default=“1” default_title=“Home” sections=“web-design, portfolio, articles, about-marc, contact-marc” wraptag=“ul” />
I like that it’s automatically adding an active class to the active menu item, so I’m wondering if I should start with that somehow. But I’ve no idea if that’s a good idea.
Offline
Re: Tips on implementing a "mega menu"
Hi Marc,
as you can use txp:section_list
with a form or as a container tag, you can deeply customize its output.
Then, not sure if you already know this, but you can use txp tags inside other txp tags attributes, so you can do crazy things with that, like:
<txp:section_list>
<txp:article_custom section='<txp:section />' />
</txp:section_list>
(that snippet alone may be the basic building block of what you are trying to build).
You then can also experiment with txp:if_different
to further control the output until you make TXP output the exact markup you are looking for.
My advice is: craft the HTML/CSS/JS first, get it working properly, and then start to swap out the static HTML, replacing it with some TXP magic dust.
Have fun!
Offline
Re: Tips on implementing a "mega menu"
Mind blown. Very cool! Thanks for the tip…I love learning about all these txp tags.
Offline
Re: Tips on implementing a "mega menu"
I use a menu system that I like rather well. It uses xhtml and css.
It loads rather quickly to.
Offline
Pages: 1