Reply
Top navigation bar
Old 09-30-2004, 05:00 PM Top navigation bar
Junior Talker

Posts: 3
I am starting to build a website. My basic layout plan looks something like this:

-------------------------------------------------------------------------------------------
*site name*

*navigation bar with links to the various areas of the site*




CONTENT




-------------------------------------------------------------------------------------------

Every page in the site will have the same title and navigation bar at the top, but with content, obviously, varying from page to page. The problem is that my site will consist of a lot of pages, and if I happen to change the design of my navigation bar at some point, I don't want to have to update every page. Is there some sort of script I can use that will allow each page to reference another document containing the script for the navigation section, without affacting its appearance in any way? (I certainly don't want to use frames... I want it to look completely normal, but allow , me to easily update just the top section.) Here's an example of the basic design idea: http://www.alternet.org/
zigzag86z is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 09-30-2004, 05:45 PM
KeithMcL's Avatar
Super Talker

Posts: 128
Location: Dublin, Ireland
I was going to say you could use frames but you asy you don't want to. An alternative way is to use Server Side Includes (SSI). I wrote a short article on it, which you can find here:
http://www.webdevinfo.com/articles/28
KeithMcL is offline
Reply With Quote
View Public Profile Visit KeithMcL's homepage!
 
Old 09-30-2004, 06:11 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
PHP is the perfect solution for you. Create a function called writeHeader() and writeNavBar() that each page calls from an included PHP file. If you want to make the change you mentioned, you change the one function and the functionality is immediately rendered to all pages.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Reply     « Reply to Top navigation bar
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12010 seconds with 13 queries