Navigation Bar
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 posted this at 22:43 — 11th February 2006.
She has: 11,421 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.
Megan
Connect with us on Facebook!
demonhale posted this at 01:33 — 12th February 2006.
He has: 3,278 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...
EGS posted this at 03:18 — 12th February 2006.
They have: 161 posts
Joined: Jan 2005
Yeah, I'd recommend using PHP includes also.
Blue posted this at 22:44 — 16th February 2006.
They have: 112 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
cpellizzi posted this at 07:13 — 17th February 2006.
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 posted this at 14:03 — 17th February 2006.
He has: 2,667 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
Tim
http://www.tandswebdesign.com
demonhale posted this at 14:22 — 17th February 2006.
He has: 3,278 posts
Joined: May 2005
I totally forgot to mention that tim, its several times php and htaccess has saved the day...
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.