Part 2 - Including HTML
OK, so now you see that you can add HTML fragments to another HTML page to
modularize the design for design simplicity and easy updating. The type of
SSI to do this is called the Virtual Includes command. It generally looks
something like this:
<!--#include virtual="/directory/include/file.htmlf"-->
So how would you use Virtual Includes on your own site? The first thing you
need to do is to sit down and take a good long look at how you plan to
layout your site. Are there any elements that will be on every single page?
What about some graphics or other HTML that will just occur on pages within
a particular section? Asking these questions helps you to think modularly -
what are the basic units your site will be built of, and how much can you
simplify your design by using SSI? Ideally, your pages will look like the
Radiation page from the example above: just text on a blank page, with the
entire graphic look and navigation being pulled from virtual include files
stored elsewhere on the server. (Note: depending on how much you use SSI,
you might find it helpful to set up "includes" directories to keep them
organized)
|