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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How to repeat navigation area on all pages
Old 12-24-2008, 11:48 AM How to repeat navigation area on all pages
Junior Talker

Posts: 4
Name: Pamela
Trades: 0
Hi everyone -

This is pretty basic, I think, but I'm a beginner..

In writing a strict XHTML site, what's the 'best practice' way to keep the same top/side nav across multiple pages of a site so that I just have to edit one place to change it on all pages? Then each page would have a content area specific to the page.

I appreciate any guidance!

Thanks,
pwee
pwee is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-24-2008, 12:01 PM Re: How to repeat navigation area on all pages
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
PHP Code:
include("header.php"); 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 12-24-2008, 12:43 PM Re: How to repeat navigation area on all pages
Average Talker

Posts: 17
Name: Chris
Trades: 0
I've used two methods for this... one requires you to use the extension of .shtml for the files that will have the include...

The code is:
<!--#include virtual="ncludes/nav.html" -->

The other requires an extension of .php for the files that will have the include...

The code is:
<? include('includes/nav.html'); ?>

Just put this inside the div or table and the file will appear.

Hope this helps! MERRY CHRISTMAS!!!
__________________
- Chris. Dabbling learner.

Last edited by redline5th; 12-24-2008 at 12:44 PM..
redline5th is offline
Reply With Quote
View Public Profile
 
Old 12-24-2008, 01:12 PM Re: How to repeat navigation area on all pages
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/html-f...tml#post816365
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-24-2008, 01:19 PM Re: How to repeat navigation area on all pages
Defies a Status

Posts: 1,606
Trades: 0
Quote:
Originally Posted by redline5th View Post
The other requires an extension of .php for the files that will have the include...

The code is:
<? include('includes/nav.html'); ?>

Hope this helps! MERRY CHRISTMAS!!!
Page has to be php parsed. The extension can still be html on most modern servers. It is all in how you set it up.

I vote for the OP using php. Far stronger solution in the long run.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 12-24-2008, 02:11 PM Re: How to repeat navigation area on all pages
Banned

Posts: 421
Location: Boston, MA
Trades: 1
Another option is server side includes, SSI. Pretty easy to use.
webcosmo is offline
Reply With Quote
View Public Profile Visit webcosmo's homepage!
 
Old 12-27-2008, 12:13 PM Re: How to repeat navigation area on all pages
Super Talker

Posts: 143
Trades: 0
You can use an include or if you are writing each page as you go, you may just make a template of the page and then add the changes as you go. This is only good for a small site, you don't want to do this if you have more than a few pages on your site.
__________________

Please login or register to view this content. Registration is FREE
specialk is offline
Reply With Quote
View Public Profile
 
Old 12-30-2008, 10:36 AM Re: How to repeat navigation area on all pages
Junior Talker

Posts: 4
Name: Pamela
Trades: 0
thank you everyone for your help!

happy 2009!!

~pwee
pwee is offline
Reply With Quote
View Public Profile
 
Old 01-02-2009, 10:11 PM Re: How to repeat navigation area on all pages
Average Talker

Posts: 29
Trades: 0
Or just use a program like dreamweaver to create the navigation for you.
bustya is offline
Reply With Quote
View Public Profile
 
Old 01-03-2009, 11:06 AM Re: How to repeat navigation area on all pages
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
Or just use a program like dreamweaver to create the navigation for you.
DW cannot do what the OP wants. He needs server-side includes.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-04-2009, 03:15 AM Re: How to repeat navigation area on all pages
Silent77's Avatar
Ultra Talker

Posts: 269
Name: Silent
Location: Ohio
Trades: 0
Quote:
Originally Posted by LadynRed View Post
DW cannot do what the OP wants. He needs server-side includes.
DW can. I use it at work all the time, you just need to set up a template or w/e they call it. Pretty sure your host has to support that though.
__________________
Firefox
rediscover the web

Please login or register to view this content. Registration is FREE
Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
Reply     « Reply to How to repeat navigation area on all pages
 

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