include

The include SSI directive allows you to:

boilerplate your html!

Wow!...but what does this do for me?

With SSIs and include you can set up a standard template for you web pages which could (suggestion) include

  • A standard header
  • A set of navigation buttons
  • A standard footer
Big deal!

Well it is if you decide to change you "house style" and you have 50, a 100, or 1000 html document which you need to edit. If you had used include you could make the change by editing:

  • your standard header include file
  • your navigation buttons include file
  • your standard footer include
and you all you documents would then display you new "house style".

"Right! You convenced me. How does this work?"

 
<!--#include file="some/header/file"-->
or
<!--#include virtual="/house_stds/std_header_file"-->
  Almost every document in the Apache RTFM looks like:  
<!--#include file="rtfm_header.shtml" -->

<!--#include file="your new html file.html" -->

<!--#include file="rtfm_footer.shtml" -->
  I confess, that there is a little more to each one, but I'll cover thoses differences in the next section.

The important points are the inclusion of a standard header and footer file. If I want to change the look of the Apache RTFM, I can by editing these two files, and every file in the RTFM will show these changes.

I'm confussed! You have rtmf_header.shtml and then use "your new html file.html". Why?

I use some SSI directives and some eXtender SSIs in the header and footer, one of which I mentioned in the section on flastmod and I want Apache to treat these files as SSI files and process them. The main bulk of the RTFM is just html, so to reduce the load on the server, I use an html file extension.

You can imply from this, that

  • SSI document can include other SSI documents
    • and they can alson include SSI documents
      • which can intern include SSI documents
        • and so can these.......

I just thought, that being an RTFM, I shouldn't imply this, but tell you it explicitly. ;-) (this is not a typo, it's a smiley)

One thing more that SSIs can do for you. If you look at the main RTFM index page, you will see links to.

  • All the pages in this section

Html is great for browsing, breaking up large documents into easily digestable sections, but what do you do if you want to get all the sections in a single document to (heavens forbid) print a copy?

Just create a SSI document with all the .html pages included, plus the header and footer (once) and you can get all the sections/sub-sections in one document.

This may not impress you, but IMOSHO, I think it's a great feature.

 


Running Commands with SSIs   RTFM Index   XSSI eXtended SSIs
Copyright © 2006 Open Source Migrations ltd. All Rights Reserved.
Apache RTFM last updated Saturday October 21 2006