navigation solution
- Started
- Last post
- 12 Responses
- stewart
i have a html/javascript based horizontal navigation menu that i want on top of every html document of my (non-dynamic) website.
if i don't want to copy and paste that part to 50 html pages everytime something in the navigation changes...
is there a way to put that html part in top of every page by adding a link to an external javascript or something?
by the way: again, it is not a dynamic website, no CMS, and i don't know on what server type it is going to be hosted.
i hope someone can give me a push in the right direction.
- k0na_an0k0
you have some options.
either use and include, or, make a template page with the menu included, and and editable region for all your other stuff. make each new page from this template. so... if the menu ever changes you open the template, change it, then say 'yes, apply to all' and it makes the navigation change.
- Luckypp0
Server side include for your navigation.
Most servers will be able to handle that.
- Luckypp0
Or you could (gulp) can't believe that I am going to suggest this, use frames.
- stewart0
Serverside include, i know it works for NT servers. What about Unix and others?
and Kona, templates... in DreamBeaver?? tell me more!
- gabriel20
you could also use javascript to write out the navigation html into the page using document.write while keeping the navigation itself in a .js file...
- stewart0
i forgot to say that frames are NOT an option, because DIV's can't be displayed over frame borders, or are they?!
- k0na_an0k0
file:new:template page:html template
whalla. make all your code. where you want content different on each page insert:template objects:editable region/repeating region etc.
good luck.
- stewart0
holy shite Kona, that sounds like good music!
- stewart0
Kona, i made a template with the Repeat and Editable sections and saved as .dwt
from this file i saved two other pages as html files
after that i changed the Repeat section of the .dwt file and saved, but no "yes, apply to all" message popped up.
is it even more complicated?
- k0na_an0k0
no probs. once you save the template, you start creating pages from that template and add in your new stuff. then if you go back to the template and change something it will see it's been used and it will ask you if you want to make the changes to all. instead of saving as, try file:new from template?!? i think!?? hang on...
- k0na_an0k0
yeah. new from template. that should do it. once you make a page from that template you can save as and it will be all cool once you go back to make a change.
- stewart0
Kona, 1000x thanks for your help, this is X-actly what i need.
if you need something, you can always call me. i can cook you a nice Tagliatelle à Tuna.