PDA

View Full Version : Updating a navbar



Jetx
29th March 2006, 9:08 PM
When using a navbar (margin of links at the side of the page), do you REALLY update every single one of your pages with a new link on the navbar, or is the some special way of adding a link to every single one of your pages? If you do go through all of your pages, I've got a slight problem. ;/

liquinn
29th March 2006, 9:20 PM
I updated one page on my site and it updates ALL the left/top nar bar.

Dragonfree
29th March 2006, 9:37 PM
liquinn, that was a useless comment. Please don't say anything unless you can actually help the guy. Right now, that only helped him be even more confused that for him it doesn't work like that.

And Jetx, since your site is on Freewebs, you'll be able to use SSI for it. Cut out the menu from the HTML and instead place it in a separate file called maybe (for example) menu.txt. Then, to replace the menu, you'd put this code:


<!--#include file="menu.txt" -->

Then (although I'm not sure Freewebs requires this step; I think I've heard somebody say it worked without it) you'd rename your pages as whatever.shtml instead of whatever.html or .htm.

Do this on every page, and you'll never have to do it again - just open menu.txt (or whatever you named it) and edit that file with the link, and the updated file will be included on every page.

Doing this will not affect the look of the page or anything, by the way.

JKaizer
1st April 2006, 4:18 AM
And if you ever get a new host that supports PHP, here's the PHP code
<? include("menu.txt"); ?>

Hiroki
1st April 2006, 6:32 AM
There is a simple thing called SSI... ;) DF stated it above.
http://www.a-2z.com/showthread.php?t=55 That's a tutorial I made for that forum, go read if you'd like.

Jetx
1st April 2006, 10:13 PM
That makes life so much easier. Thanks guys. :D

Takes up a little more space, but it's much easier.

Mods can close this now.