Hi, I was wondering how I could update a site-wide link on my site. Instead of manually adding the link to each page separately, I was wondering how I could set it up so that I could edit the links in one location, and have have that change effect all the pages in my site. Kinda like how you have one external CSS file, and then just link to it in the code. These links need to be indexable, so using PHP or Javascript to display the links won't work. I'm sure there are tools in DreamWeaver etc, but I'm using Notepad. Thanks go to anyone who can suggest a simple solution!!!! Thanks!!!!!!!
The solution is PHP. PHP will be indexable, but JavaScript will not. Just create a separate links.php file - add your links to that and then include the links.php file into all your pages. I leave the implementation to you as an exercise.
e.g Create links.php, containing something like: <a href="http://www.google.com">Google</a> Then paste this into your pages wherever you want the link(s) to appear. <? include "links.php"; ?> You'll either have to be using .php extensions on your pages, or fiddle with htaccess to make your .html or .htm pages parse php. It doesn't sound like much fun, but it's worth it
PHP is executed on the server - as far as browsers/spiders/bots are concerned, it's a hard coded document that you typed out yourself.