next up previous contents
Next: MIC Error Handling Up: MICinclude Previous: Syntax   Contents

Description

This command is used to include repeated code or text. This command specifies a document or part of a document to include verbatim4.13 at the point at which the tag is included. You could think of it as simply dropping in the text of the file. Note that the MICinclude statement is evaluated at compile time, meaning that you cannot have variables in the src attribute.

The file is specified in an pile-absolute manner meaning that it is not relative to the current page, but relative to the root of the site to be compiled. The file is specified with path information, so if the 'hello' was in directory '/bob/micsite/branch' where micsite is the root of the site to be compiled, then you would say `src="branch/hello".' Note also that you never have a leading `/' in the path information.4.14

To support files that are meant to be included in several different piles (and therefore cannot be strictly contained under a single pile root), one may use the -I option at compile time to specify an include directory (see 3.3). In this case, the pile-root relative file is first looked for and if net found, then the file is looked relative to the include directory. So, from above, if there were no file `/bob/micsite/branch/hello,' and the pile was compiled with `-I /bob/include,' then the compiler would search `/bob/include/branch/hello.' Note the search order above.

Note that because they are already included, files with the extension .html, .mic or .fs that are within the site should never be MICincluded. By convention, included files should have a `.inc' extensions.

It may be possible to MICinclude files which are external to the site (i.e., src="../style.inc"), but the feature is unsupported at the time of this writing.


next up previous contents
Next: MIC Error Handling Up: MICinclude Previous: Syntax   Contents