I’ve written this module to make it easier for people to maintain navigation for their websites.
The module allows you to create navigation groups (f.i. Main Navigation, Sub-nav, Footer links) containing links to any part of your EE powered website or any custom URL.
Some of the module’s features are:
- custom ordering of items
- ordering by title and even tite length (number of characters in the item’s title)
- sorting (asc, desc)
- alternating row colors (switch parameter)
- advanced conditionals
All items (links) are dynamic, which means that if you change the name of a template_group, template, category, entry title or url_title, they will automagically keep working like they should.
Navigator is a free module, and you can download it right here, right now.
Cheers
EDIT 20081106: Updated download link to version 1.2.1
At the moment the module does not have an easy way for building submenu’s.
I am still investigating how to implement this. There are so many ways to do menu’s…
For now there are several ways to accomplish what you described but all methods require some JavaScript knowledge.
In this example I used the {nav_properies} field to specify which items are MAIN items just by typing “main” in the Properties field.
Here is an example of the code:
<script> function toggleMenu(id) { e = document.getElementById(id); if (e.style.display == "none") { e.style.display = "block"; } else { e.style.display = "none"; } } </script>
Not the most elegant solution, but it works.
If you want only one your main item open at a time (collapsing all others) you need some extra lines of JavaScript.
Yes, i’ve got to have only one MAIN item open and all others stay collapsed until I click on another MAIN item (otherwise the menu gets too crowded).
Do you know where I can get a good script that does it? I have seen it somewhere before but can’t remember where.
Anyway, i think your module can become a very important part of EE’s functionality pallet, so: consider this a feature request, also for some flexible current page highliting with a choice to highlite by template, by weblog, by category…
Keep up the good work!
I tried it and it works just fine, GREAT!
One thing though:
Neither the body onload nor the little script shows “main_1” expanded after loading that Template. All MAIN items appear in their collapsed state after loading the page so I still have to click to show the sub items. Any idea how to fix that?
OK, found it, works like a charme now.
As usual it was just a typo on my side, sorry for the intrusion.
The site is currently running offline on a MAMP server for development.
I’ll send you a link when it’s online.
Guess I owe you a view beers! That was so helpful.
Thank you,
Silvia
Me again,
I was looking for a way to include things like:
title=“homepage”, onfocus=“if(this.blur)this.blur()”, with the Navigator generated links.
I also found Navigator links are triggering IE’s Whitespace Bug when displayed in an Unordered List, so it would be useful to have an option for whitespace-less markup.
Do you plan to add such in a future »escape«?
Just asking, You know
You can use the Properties field for ehm… properties, but you could also use the Description field.
Just paste your - title=“homepage” onfocus=“if(this.blur)this.blur() - etc. in there and include the variable in your code.
Here is an example that does just that, and also removes the whitespace you mentioned.
Cocoaholic,
as i’m testing different ways to do a well structured navigation i see much potential for navigator if it manages to integrate the functionality/scripting to support different types of nav/subnav, dropdowns, accordion…
Thanks for helping.
Silvia
I don’t think I will ever offer out of the box menu’s, just the valid markup to create them.
You already have your harmonica working, you just need to add some nice AJAX fx
The way you can choose a Parent Category in EE seems the way to go for this module, but I would also like to keep it flexible enough so people can create other types of menu’s besides nested lists.
Ideas on how to improve the module are always welcome of course.
Don’t have much time now but I will keep you posted.