Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 3
Trades: 0
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
 
 
Register now for full access!
Old 09-30-2004, 06:45 PM
KeithMcL's Avatar
Super Talker

Posts: 128
Location: Dublin, Ireland
Trades: 0
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
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
KeithMcL is offline
Reply With Quote
View Public Profile
 
Old 09-30-2004, 07:11 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.17318 seconds with 12 queries