There are two ways to include other content into the current page component:
- <!--#include file="/actual/path/to/file" -->
This would look for a file on the filesystem with the path
"/actual/path/to/file" and insert its contents. Relative paths as well
as absolute paths are permissable; as long the include is present in the
location in relation to the present component's location, it will work.
- <!--#include virtual="/virtual/path/for/content" -->
If you have content in your web URL space that is accessible, in this instance
as http://www.example.com/virtual/path/for/content, than that will
be run through Apache as a sub-request. This has a number of advantages
over using the file style include
- Enables easy inclusion of the output from a CGI
- Allows includes to be independent of the physical file system and where
files are actually deployed
This is a popular technique for including shared components such as navigation
widgets, page counter CGI output and so forth.