Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Best Way To Add Navigation Bar To All Pages?


  • Please log in to reply
6 replies to this topic

#1 doogie88

doogie88

    HR 4

  • Active Members
  • PipPipPipPip
  • 260 posts

Posted 08 March 2011 - 03:49 PM

I'm a bit confused on something that is probably really simple.
How do people put their navigation bar on their pages, so it's one file?
Are they using PHP and just renaming the files to .html? Because you don't see a lot of php files on sites, or in rankings, always seems to be html.

#2 Michael Martinez

Michael Martinez

    HR 10

  • Active Members
  • PipPipPipPipPipPipPipPipPipPip
  • 5,063 posts
  • Location:Georgia

Posted 08 March 2011 - 05:55 PM

There are a variety of ways including (but not necessarily limited to):
  • Using a CMS that dynamically encodes the menu for you (Wordpress, for example)
  • Placing the code in a Javascript file and linking to that from every page
  • Placing the code in some other widget and linking to that from every page
  • Placing the code on an iframed page and embedding that on every page
  • Placing the code in a Perl or PHP include script
  • Coding the menu by hand into every page


#3 Jill

Jill

    Recovering SEO

  • Admin
  • 32,913 posts

Posted 08 March 2011 - 07:10 PM

Or it could be in a server side include file.

#4 doogie88

doogie88

    HR 4

  • Active Members
  • PipPipPipPip
  • 260 posts

Posted 08 March 2011 - 09:10 PM

I think server side include is what I'm thinking of. That can be done with just html right?

#5 Michael Martinez

Michael Martinez

    HR 10

  • Active Members
  • PipPipPipPipPipPipPipPipPipPip
  • 5,063 posts
  • Location:Georgia

Posted 09 March 2011 - 01:48 PM

Ack! I had actually intended to include "server side includes" when I composed that list, but I was doing it off the top of my head and ideas just kept floating in....
mf_zap.gif dash3.gif

#6 qwerty

qwerty

    HR 10

  • Moderator
  • 8,604 posts
  • Location:Somerville, MA

Posted 09 March 2011 - 04:18 PM

QUOTE(doogie88 @ Mar 8 2011, 09:10 PM) View Post
I think server side include is what I'm thinking of. That can be done with just html right?

Sort of. An html page that utilizes SSI is actually a .shtml page. You can call your files page.shtml, or if you prefer another file type, you need to add a few lines to your .htaccess file (you actually need to add most of this even if you don't want the server to allow you to use a file type other than .shtml):
CODE
AddType text/html .shtml .html .htm
AddHandler server-parsed .shtml .html .htm
Options Indexes FollowSymLinks Includes


#7 doogie88

doogie88

    HR 4

  • Active Members
  • PipPipPipPip
  • 260 posts

Posted 10 March 2011 - 12:49 AM

Okay, thanks a lot.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!