Re: Need help with common web page information

by Jim Tom Polk <jtpolk(at)texas.net>

 Date:  27 Dec 2001 13:27:27 -0600
 To:  "hwg-basics(at)mail.hwg.org" <hwg-basics(at)mail.hwg.org>
  todo: View Thread, Original
It is going to depend upon your web server and the permissions on the
server where the pages are located. 

Most Apache web servers allow for the inclusion of a file inside another
web page using SSI (Server Side Includes). 

Say you have a file thus:

test.shtml (the shtml extension tells the server to look for SSI)

---<snip>---

<!--#include file="header.inc" -->
<!--#include file="body.inc" -->
<!--#include file="address.inc" -->
<!--#include file="footer.inc" -->

---<snip>---

And that could be the entirety of the file, with all of your HTML inside
each of those files.

http://camalott.com/~jtpolk/htmlcorner/ssi/

This is some work I did ages ago (1997) that demonstrates some of the
things that you can do (and it is done with "evil" frames to boot), that
is created from nothing but included files.

There are better reference materials elsewhere on the web, I would look
at those.

(and yes, I haven't mess with my personal home pages in a hamster's
life!)

The biggest problem is usually figuring out how your web server is
configured. 


>>>>
How can I create common information and have it included on each web
page without copying the code from one page to another?
<<<<
-- 


Jim Tom Polk -:- jtpolk(at)texas.net -:- http://camalott.com/~jtpolk/	
	''You might as well fall flat on your face as 
	  lean over too far backwards.''      --James Thurber--
   "The Universe is run by the complex interweaving of three 
          elements: energy, matter and enlightened self-interest." 
 		- G'Kar  "Survivors"                                  

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA