A server-side include is a variable (an HTML page, text document, server variable) inserted into a web document before it's sent to the requestor (browser). A common use of this is using one master HTML or text document to create navigation features that might appear on many pages within a web site.
The benefit of an include becomes obvious when identical changes to many pages need to be made. With an include you only need to edit one master document.
Insert the include call at the point where you want the information to appear (alter the example below to reflect the location of your include file):
<!--#include virtual="/footer.html"-->
In this example we've hard coded a path to the file footer.html. This allows us to use the same document within any directory on the server.
Once you've inserted the include statement into the document you'll need to telnet to the server and issue a chmod a+x to the document containing the include statement. This allows the file permission to execute the statement. If you do not have telnet access to the Unix server, contact Internet Development for assistance.
An example of the server side include adding a server variable is a timestamp. This automatically inserts the date last modified. Again, you must issue a chmod a+x to the file containing the include to activate:
<!--#echo var="LAST_MODIFIED"-->
To add a current day date stamp:
<!--#config timefmt="%A, %B %e, %Y"-->
<!--#echo var="DATE_LOCAL"-->
This will result in the following display:
Saturday, November 21, 2009
You can insert a server side include on PulseNT as follows (replace navigate.html in the example below with the path to your include document):
<!--#include file="navigate.html"-->
If you're using the FrontPage Editor to insert your include, place the cursor at the point of insertion: select Insert > FrontPage Component... > Include Page. You will receive a prompt for the page location. Once you've completed this step your include information will display on the page. This step is the easiest if you're operating within a FrontPage web.
The timestamp example illustrated on the Sun server above is added in FrontPage by doing Insert > Timestamp.
Identical to the steps followed for PulseNT.
