.

MIT Libraries

Web Guidelines: MIT Libraries

Server-side Includes

We are using server-side includes (SSI's) for the following:

1) the "quicklinks" menu

2) footers on all individual library pages

3) "this page was last modified on..."

4) Google Analytic code

Most of the time you won't need to think about these includes, since they are built into the templates.

You do need to remember to always get the templates by ftp'ing them from the server (instead of "save as..." from your browser) in order to preserve them.

Reference for webmasters

1) The quicklinks file is stored at the root level of our site:
/afs/athena.mit.edu/dept/libraries/www

It is called "quicklinks.txt".

Since it is a menu controlled by javascript, it will only work on those pages that already have the correct script in the header of the page. Namely:

• the home page
• each individual library home page
• all "guides" (subjects, courses, types, cheatsheets)

The code to include it is:

<!--#include virtual="quicklinks.txt" -->
or
<!--#include virtual="../quicklinks.txt" -->

..depending on where the page is located. This code is built into the templates.

2) The footers for each library are stored at the root level of each library's directory. For example:
/afs/athena.mit.edu/dept/libraries/www/barker

The file is called: barker-footer.txt
It contains the footer stripe for 2nd-level pages in each library's directory.

<!--#include virtual="barker-footer.txt"-->
or
<!--#include virtual="../barker-footer.txt"-->

..depending on where the page is located. This code is built into the templates.

3) Here is the code to insert that will automatically show the date the page was last updated:

<!--#config timefmt="%D" --> This page was last updated on <!--#echo var="LAST_MODIFIED" -->

It's already in all the "guides" templates, individual library templates, and "simple" templates.

To make server-side includes work on pages served by "macfadden" (our staff web pages), as opposed to those served by "libraries" (our public web), please contact Darcy Duke (darcy@mit.edu).