Am I alone?
I admit to being a relative novice though I have designed a few small ecommerce sites. When designing navigation bars, I tend to either put them below the header or down the left margin like most other people.
My problem is...for large sites they are difficult to modify without having to change hundreds of pages. I realize that my question is quite fundamental but I really want to learn. How do you all do it so you don't have to update every page on the site every time the navigation bar needs to change?
AndyB posted this at 17:24 — 25th June 2000.
They have: 344 posts
Joined: Aug 1999
One way is to create the entire navigation 'bar' as a javascript file using document write statements and then saving just the content as (for example) mynavbar.js. Save everything except the opening and closing script tags.
Then for every page that needs a navbar:
<script language="javascript" src="mynavbar.js"></script>
will include the external source file into each page - loaded from cache - and generate the menu.
Then when you change your menu, you need only change one file.
Suzanne posted this at 20:59 — 25th June 2000.
She has: 5,507 posts
Joined: Feb 2000
SSI is probably a better option, so you don't lose folks without JavaScript enabled (who wouldn't be able to navigate your site).
You can use SSI on Unix or NT servers, just slightly differently set up.
(wow, just all over you today, Andy!)
www.webdesignclinic.com has an article about using SSI to make navigation easier.
------------------
Zero Cattle
Suzanne
Tables DeMystified
Keensurfer posted this at 21:12 — 25th June 2000.
They have: 4 posts
Joined: Jun 2000
Suzanne,
Thanks! Seems like a great place to learn LOTS of STUFF! I really appreciate it.
Keen
TWTCommish posted this at 14:46 — 27th June 2000.
They have: 62 posts
Joined: Jun 2000
Keen:
I agree with what was said before...SSI is much more efficient than inserting a JavaScript file. Also consider databasing your site in PHP or SQL...hard to learn, but will save you a lot of time in the long run...and you can probably charge a lot more in terms of web development fees if you can offer extra scripting perks as well as a solid layout...
------------------
Chris Bowyer
MyCoding.com: Join our Mailing List for Launch Notification!
"I'm not an insomniac, I'm a web designer."
Movie Forums | Quote DB | Scriptomizers | Distance Learning | M. Night Shyamalan
About Taxes | Hacker Dictionary | Conference Calls | Dietary Supplements
Traveling Advice
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.