Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-24 16:54:40

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 596
Website

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

#2 2010-09-24 17:31:21

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2010-09-24 20:25:27

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 596
Website

Re: Tips on implementing a "mega menu"

Mind blown. Very cool! Thanks for the tip…I love learning about all these txp tags.

Offline

#4 2010-09-24 20:46:25

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 573
Website

Re: Tips on implementing a "mega menu"

I use a menu system that I like rather well. It uses xhtml and css.

Free Style Menu

It loads rather quickly to.

Offline

Board footer

Powered by FluxBB