;;; sec1.03.mhtml: -*- Meta-HTML -*- 

;;;  Copyright (c) 1996 Universal Access Inc.
;;;  Author: Henry Minsky (hqm@ua.com) Sun Sep 15 11:04:21 1996.
<set-var title="Include and Require: Simple File Commands">
<include header.mhtml>

<plain-text>
  <pagelist-control-panel>

  <h2><code>include</code> and <code>require</code>: Simple File Commands</h2>

  <h3>Including Common Content In Web Pages</h3>

  A set of Web pages at a site often have a large amount of
  common content, such as headers, footers, or other blocks
  of HTML code. 

  The <secref File Operators> section of the reference manual details
  the <funref include> and <funref require> Meta-HTML tags.

  The <funref include> tag takes the name of file, and effectively
  inserts in into your page right at that point in your page where
  you call it.

  Let's say you have a common header file for your pages which
  defines the body, background, and some title. Say you put
  it in the file "header.mhtml" in your document directory.

  You can reference it in your page by calling

  <example-table>
  <include header.mhtml>
  </example-table>

  The location of the filename argument to <funref include> is
  interpreted relative to the location of the Web page which is
  being executed. 

  If you want to include a file from another directory, you can give
  either a relative pathname, (including the use of "../"), or a
  pathname relative to the document root directory of your Web
  server. Here are some examples:


  <i>Gets the file header.mhtml from the parent directory</i>
  <example-table>
  <include ../header.mhtml>
  </example-table>

  <i>Gets the file header.mhtml from the document root directory</i>
  <example-table>
  <include /header.mhtml>
  </example-table>


  <i>Gets the file header.mhtml from a directory called /macros under
  the document root directory</i>
  <example-table>
  <include /macros/header.mhtml>
  </example-table>

  <pagelist-control-panel>
</plain-text>
<include footer.mhtml>
