Ezilon.com - Target Your Audience, be Seen in Your Region

Navigation Bar

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 1 posts

Joined: Feb 2006

Hi,
I am completely redoing my website but I have a problem with the navigation bar. You see, every time I add a new page I have to go and add a link to that new page on the navigation bar on every single other page on my site. IT DRIVES ME CRASY!!! I was wondering if I can somehow update all the navigation bars by just editing one file without using frames. I would love it if I could to do so in CSS since I already know a little bit about CSS. Can I? Please someone help me!
Thanks!

Megan's picture
Administrator

She has: 10,032 posts

Joined: Jun 1999

There are a couple of ways that you can do this. CSS is just for visual formatting, so it won't help with this particular problem (although, if you used a link stylesheet to format the appearance you'd be able to change that just by changing one file). Here's another thread that talks about the same problem:

http://www.webmaster-forums.net/showthread.php?t=32574&highlight=server+side+include

Let us know if you have any more questions.

demonhale's picture

He has: 3,195 posts

Joined: May 2005

-Copy your html for the link part then save it as php
-convert all your pages to php
-on these pages instead of the links tags, replace it with a php include linking to the link php file...

Now everytime you edit you links php file, it will update on all the php pages that have the include links...

They have: 168 posts

Joined: Jan 2005

Yeah, I'd recommend using PHP includes also. Smiling

They have: 106 posts

Joined: Aug 2001

Or you can you a template with the manu in the template or you can make the menu a library item and insert that in each file. Then you only have to update the library item or template and it will automatically update in all your other pages. Which HTML editor are you using?

Blue

He has: 57 posts

Joined: Apr 2005

I would use php, ssi, or css. Php is probably your best option but then you have to rename all of your pages.

timjpriebe's picture
DeveloperModeratorSponsor

He has: 2,666 posts

Joined: Dec 2004

You do not have to rename all your pages if you use PHP. Just add the following line to your .htaccess file.
AddType application/x-httpd-php .php .html'
That will tell your server to interpret all .html files as .php files. The nice thing is, because of how php works, any pages that are just normal html will still work fine as well.

If you do not know what a .htaccess file is, one guide is here:
http://www.javascriptkit.com/howto/htaccess.shtml

demonhale's picture

He has: 3,195 posts

Joined: May 2005

I totally forgot to mention that tim, its several times php and htaccess has saved the day...