Ask the Readers: How do you build navigation?
In last night’s EE Help Chat the question came up about different approaches to building site navigation. Some of the options mentioned were:
- Static
- Navigator Module
- Structure
- Categories
All three have distinct pros and cons. Static means there’s no messing with anything; it just works. But, of course, there’s no automatic updating of the navigation when new sections are added to the site. The other three can be problematic to implement because you inherit a certain way of doing things.
So, I ask you, EE Insider readers: How do you set up your EE site navigation? Let us know in the comments.
Share on Twitter
John Rogerson — 04:07 on 09.24.2009
I like to retain management of sections, so I go with static. In my experience, many clients prefer this; they find managing sections an onerous task and often times is one of the most fragile aspects of a design, especially if navigation is laid out horizontally. And the amount of times people navigation _has_ to change is not a big deal for me to have to make an alteration at the template level.
Marcus Neto — 05:45 on 09.24.2009
Most of mine are static as well. I have used categories for templates though. And I just recently started playing around with Navigator and Structure so who knows. I may switch but static has not been an issue…
Wes Baker — 06:08 on 09.24.2009
Our clients are sold on the idea of being able to add and remove pages on a whim. We’ve used Structure and Categories in the past. We found Structure works better since you’re consistently using it for page hierarchy as opposed to Categories which are used for both page hierarchy and categories.
That being said, I think static is the least likely to break and probably the best way to go if the client is alright with that.
Eric Barstad — 06:21 on 09.24.2009
I tend to use static main nav and dynamic subnav using Structure. Generally speaking, clients don’t often need to edit the main nav, so hard-coding it is fine. In addition, I’ve also used the Navigator Module (as Marcus mentioned), and it can work really well depending on the situation. What I like most about Navigator is that it lets you link to *any* entry (not just “pages”) and items can be ordered in any way. However, Navigator doesn’t allow for nested items iirc.
Erik Reagan — 07:33 on 09.24.2009
I do almost exactly what Eric does. The main nav is hard coded but some items are using Structure for sub-nav. I don’t allow clients to manage the main nav and that’s understood from the beginning of a project. So far I haven’t butted heads with anyone who won’t accept that. If, for some odd reason, we don’t use Structure on a project - the subnav is powered by categories.
Kelly Sims — 07:35 on 09.24.2009
Most of my client sites are static. It’s rare for a client site to need navigation changes, and I find that most of them also don’t want to deal with that.
Giving clients the ability to change the navigation can lead to headaches as well, depending on their savviness. Even well documented instructions can be ignored, leading to a stressed client wondering why the site is borked.
Jim Wyse — 08:03 on 09.24.2009
It all depends on the job at hand and what it requires. I usually start out with Static.
Sometimes dynamic ones are generated by categories, or a list of articles, sometimes I’ll add 3 fields to a weblog: show in menu, and menu title, menu order.
The possibilities are endless.
Explaining how a dynamic menu works and how it is controlled to a client usually == ‘PAIN’.
“Simplicity is the ultimate sophistication.”
Leonardo DaVinci
Ryan Irelan — 08:38 on 09.24.2009
“sometimes I
Jim Wyse — 09:11 on 09.24.2009
Something that carried over from building simple, custom, small scale CMSs for clients.
Usually used in a side bar or drop-down.
bluedreamer — 11:04 on 09.24.2009
Typically I end up using static for main navigation, then a mixture of categories/entries to make dynamic sub navigation. Main navigation rarely (if ever) changes.
Alex Kendrick — 11:37 on 09.24.2009
I didn’t expect so many to go with static, but it is nice to know there are others that prefer that route, too. I hard-code main navigation for many of the reasons already stated: quick to implement, doesn’t need to change very often, and I don’t want to make things too complicated for clients.
John Faulds — 12:02 on 09.24.2009
Another vote for static main nav (I tend to use a lot of image-replaced main navs so adding new links wouldn’t work without modifying the CSS anyway) and dynamic submenus.
Michael C. — 12:14 on 09.24.2009
I use categories for all my main nav. I’ve worked out a system that adds only a few custom category fields, and yet gives a fully-flexible, multi-tiered navigation menu system, with optional icons, descriptions for each item, and the ability to specify horizontal lines between two items (that last one’s a bit of a hack since it uses an empty div, but whatever).
I usually plug it into some version of the suckerfish menus, and I’m set. Categories are especially easy for clients to understand and arrange on their own.
J — 12:31 on 09.24.2009
I’ll be on the static side (except for second level nav where I might use dynamically built nav).
Haven’t used Structure in production yet ...
Lodewijk Schutte — 02:16 on 09.25.2009
For main navigation, I use a category group called Site, which reflects the template groups. For example, if your nav is [home | products | about us | contact], I’d create the template groups ‘home’, ‘products’, ‘about’ and ‘contact’, and create these categories in the Site group as well, where the category url titles are the same. Then I use the Query module to create the menu and I use Low Seg2Cat to get the category ids from the URI, so I’m able to use them in my templates.
With this approach, I can add the Site category group to any weblog I want, and I’m able to put different entries in different parts of the site.
Never used Structure or Navigator, although I have used the static now and then.
Jan Quickels — 13:13 on 09.25.2009
Usually I setup the main navigation static and using categories for subnavigation.
) generating dynamic navigation made a mess in EE. So adding custom fields- like Jim described - seems to be a good alternative and reminds me of handling menu items in Typo3: “normal title” and an optional “menu-title”. I
While switching from Typo3 (sadly have to work with it too much
Sean Smith — 17:54 on 09.25.2009
Static for me. Though with one site I used categories.
Very interesting to read all the different approaches here. I’ve tried out structure in the past, but for some reason I couldn’t get it to work the way I wanted and haven’t looked at it again. Perhaps I should give it another shot.
Was unaware of the navigation module and will definitely check that out.
Cem Meric — 22:15 on 09.25.2009
Good question Ryan,
If it’s a complex task with top/main/footer navigation blocks, I setup “static elements” weblog with separate entries for each. Clients are usually ok with editing those.
Othervise for simple navigation block I use native Structure module tags.
Richard Angstmann — 06:29 on 09.26.2009
I really love discussions like this about the fundamental approaches to setting up a site from the outset. It is always one of the first things I have to ponder.
Up to now I have used a static main nav and used entries as sub nav. Always wondered if there were better/different ways of doing it.
Not poperly tried Structure or Navigator yet.
Ryan Masuga — 07:41 on 02.09.2010
Navigator was one of the first add-ons I ever installed, way back in 2006 on my first EE site. I still think it’s amazing, though I don’t use it as often. I really think it gives you amazing flexibility for navigation. That said, sometimes I just create a “navigation” category group and just use that. I go static whenever I can, though.