PDA

View Full Version : How to update the Slashdot Menu more efficiently?



Busy Bee
08-06-2008, 09:24 AM
1) Script Title: Slashdot Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

3) Describe problem:

My problem is with the practicalities of this particular menu when used throughout an extensive website. While I am used to working with drop down menus where the links are updated from a external file (so that all changes to this file are updated to all pages), this slashdot menu's links are within the body tag, meaning that any changes to the menu would have to be made on every page, which is obviously time consuming. Is there any way to update the entire site navigation more efficiently?

Thanks in advance for your help.

Ictinus
08-06-2008, 10:07 AM
Busy Bee,

You could try having a page with one menu, loading other pages into iframes, see http://www.ictinus.com/sdnmenu/simple_example_36.html
Or load your menu via ajax into a div on each page, initialising it when loaded.
Or load your content of each link into a div via ajax.

Cheers,
Ictinus

Busy Bee
08-06-2008, 11:07 AM
Ictinus,
Thanks. I don't actually know what ajax is, but i suppose i can find out about it. with the iframe option does that mean i lose the ability to configure the menu for each category/page, i.e. show menu expanded when i want to?
p.s. I like the way your example menu opens on mouse over rather than on click.
thanks,
Busy Bee

Ictinus
08-06-2008, 11:34 AM
Busy Bee,
With the iframe option, the open submenu will be open (and stay open) after the page is loaded in the iframe. You might lose the ability (of sdmenu) to mark the link/page as active in the menu, because it relies on the current URL.

One thing to note, the example I linked to makes use of the modified sdmenu known as SDNMenu. It is a little different.

Cheers,
Ictinus

Busy Bee
08-06-2008, 12:32 PM
thanks for your help. I'll give it a go.