I've got about 35 pages on my site, and everytime I add/fix/whatever in my sidebar (menu, announcements, etc) I have to change it on all pages. Can't I just have that part of my content on another page, in a text file, even if its written in html I would like to have just one place to add it.
With that in mind, is that going to undermine me as far as web ranking and pages referenced on my site, or does that stuff load into my html page before the spiders scrub it?
You can. Use PHP or Perl to insert other files into the doc.
It will not affect how spiders see stuff.
Random (*cough*) example: http://jesa.skule.ca/
If you look through the various pages, the nav bar stays the same.
The nav bar gets slurped from one file and the rest of the content from a second (which is based on the ?page= in the URL)
If your site is on an Apache server then you can use server side includes (SSI) to assemble your pages on the fly.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
You got 3 options: Perl, PHP, SSI
I think Perl is less popular than the other two.
Does your host support PHP/SSI?
Testing:
PHP:
Make a file called test.php
Code:
PHP Code:
<?php
phpinfo();
?>
Make sure the file has executable permission set in addition to read (chmod 755) (not sure if read is even needed...)
Visit the file with your browser. Either you get what you typed -> no PHP, or you get other stuff.
SSI:
Stick this somewhere in your HTML file and see if it works:
Stick this somewhere in your HTML file and see if it works:
An HTML file with the extension .shtml that is.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Bookmarks