The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>
      WebMake: Documentation: Contents
    </title>
    <meta name="generator" content="WebMake/2.2" />
    <style>
      body {
       background-color: #ffffff; 
       color: #000000; 
       font-size: medium;
       font-family: verdana,lucida,helvetica,sans-serif;
      }
      code, samp, pre {
       font-family: Courier New,courier,fixed-width,monospace;
      }
      H1 { font-size: x-large; font-family: Garamond,Book Antiqua,Times,serif; background: #FFCC66; }
      H2 { font-size: large; font-family: Garamond,Book Antiqua,Times,serif; background: #FFDD77; }
      H3 { font-size: medium; font-family: Garamond,Book Antiqua,Times,serif; background: #FFEE88; }
      H4 { font-size: small; font-family: Garamond,Book Antiqua,Times,serif; }
      H5 { font-size: x-small; font-family: Garamond,Book Antiqua,Times,serif; }
      H6 { font-size: xx-small; font-family: Garamond,Book Antiqua,Times,serif; }
      A:link {
       font-weight: bold;
       color: #004000;
       text-decoration: underline; 
      }
      A:visited {
       font-weight: normal;
       color: #008000;
       text-decoration: underline; 
      }
      A:active {
       font-weight: bold;
       color: #800000;
       text-decoration: underline; 
      }
      dt {
       font-size: medium;
       font-weight: bold;
       padding-top: 8px; padding-bottom: 8px;
      }
      dd {
       padding-top: 8px; padding-bottom: 8px;
      }
    </style>
  </head>
  <body bgcolor="#ffffff" text="#000000" link="#3300cc" vlink="#660066">
    <font face="lucida,verdana,sans-serif">
      <div align="center">
         <img src="images/WebMakeTitle.png" alt="WebMake" width="500" height="122" />
      </div>
      <table width="100%">
        <tr>
          <td valign="top">
             <strong><a href="http://webmake.taint.org/">WebMake</a>
             Documentation</strong> (version 2.2)
             
          </td>
          <td valign="top">
            <div align="right">
              
               [ <a href="sitetree.wmk.html">Back</a> | <a href="index_01-intro.html">Forward</a> | <a href="index.html">Index</a>
               | <a href="allinone.html">All&nbsp;In&nbsp;One</a> ]
               
            </div>
          </td>
        </tr>
      </table>
<!-- yes, it's that Mozilla black-border code again ;) -->
      <!-- stolen from www.mozilla.org via rc3.org -->
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td bgcolor="#aaaaaa">
            <table border="0" cellspacing="4" cellpadding="4" width="100%">
              <tr>
                <td bgcolor="#ffffff">
                  <table border="0" cellspacing="4" cellpadding="4" width="100%">
                    <tr>
                      <td>
                         <h1>Contents</h1> <h1>Contents</h1><ul>
                          <li>
                             <h2><a href="index_01-intro.html">Introduction</a></h2><ul>
                              <li>
                                <p>
                                  <a href="blurb.html">The Blurb</a> - What it is, and what it does
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="concepts.html">Concepts</a> - Concepts behind WebMake's design
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="making.html">WebMake Operation</a> - what happens when you run WebMake
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="firsttime.html">How to Migrate to WebMake</a> - how to write a WebMake file
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="invoking.html">Invoking Webmake</a> - how to run WebMake
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="cms.html">WebMake as a CMS</a> - WebMake's content-management features, and shortcomings
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="using.html">Tips On Using WebMake</a> - Some tips on using WebMake
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="contributors.html">Contributors to WebMake</a> - Contributors to WebMake
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_02-tags_attrs.html">Tags and Their Attributes</a></h2><ul>
                              <li>
                                <p>
                                  <a href="webmake_tag.html">The &lt;webmake&gt; Tag</a> - the webmake section
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="include.html">The &lt;include&gt; Tag</a> - include another file into the current WebMake file
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="use.html">The &lt;use&gt; Tag</a> - use a WebMake plugin
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="content.html">The &lt;content&gt; Tag</a> - one chunk of textual content
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="template.html">The &lt;template&gt; Tag</a> - non-text content, such as HTML templates
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="contenttable.html">The &lt;contenttable&gt; Tag</a> - Define several small content items quickly, using a table
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="contents.html">The &lt;contents&gt; Tag</a> - load many chunks of content from one data source
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="templates.html">The &lt;templates&gt; Tag</a> - load many chunks of non-text content, such as HTML templates, from a data
                                  source
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="media.html">The &lt;media&gt; Tag</a> - load many URLs from one data source
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="datasources.html">Data Sources</a> - the protocols supported by &lt;contents&gt;, &lt;templates&gt; and &lt;media&gt;
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="for.html">The &lt;for&gt; Tag</a> - iteration construct
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="out.html">The &lt;out&gt; Tag</a> - an output file and URL
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="sitemap.html">The &lt;sitemap&gt; Tag</a> - generate a site map
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="navlinks.html">The &lt;navlinks&gt; Tag</a> - generate back and forward navigation links
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="breadcrumbs.html">The &lt;breadcrumbs&gt; Tag</a> - generate a ''breadcrumb trail'' navigational aid
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="cache.html">The &lt;cache&gt; Tag</a> - tell WebMake where to keep its cache files
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="option.html">The &lt;option&gt; Tag</a> - set options controlling WebMake behaviour
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="tags.html">Defining Tags</a> - defining tags for use in content items
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_03-proc_logic.html">Processing Logic</a></h2><ul>
                              <li>
                                <p>
                                  <a href="order.html">The Order of Processing</a> - the order of processing
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="set.html">The &lt;{set}&gt; Directive</a> - set a content chunk while inside another content chunk's scope
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="perl.html">The &lt;{perl}&gt; Directives</a> - embed arbitrary perl logic
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="globs.html">Globs and Regexps</a> - glob patterns, regular expressions and pattern matching
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="sorting.html">Sorting Lists of Content Items</a> - how, and where, it is done
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_04-var_refs.html">Variable References</a></h2><ul>
                              <li>
                                <p>
                                  <a href="content_refs.html">${content_refs} - References to Content Chunks</a> - references to content chunks
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="url_refs.html">$(url_refs) - References to URLs</a> - references to URLs
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="deferred_content_refs.html">$[deferred_content refs] - Deferred Content References</a> - deferred references to content chunks
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_05-meta.html">Meta Tags and Meta-Data</a></h2><ul>
                              <li>
                                <p>
                                  <a href="metadata.html">Metadata</a> - meta-data for content items, and how to use it
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="wmmeta.html">The &lt;wmmeta&gt; Tag</a> - defining meta-data inside the tagged content object
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="metadefault.html">The &lt;metadefault&gt; Tag</a> - Specify default metadata to attach to content
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="metatable.html">The &lt;metatable&gt; Tag</a> - Attach metadata to another content item
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="attrdefault.html">The &lt;attrdefault&gt; Tag</a> - Specify default attributes for content items
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_06-magic_vars.html">Magic Variables</a></h2><ul>
                              <li>
                                <p>
                                  <a href="imgsize.html">The ${IMGSIZE} Magic Variable</a> - automatically add image size information to an &lt;img&gt; tag
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="topslash.html">The $(TOP/) Magic Variable</a> - a relative path to the top-level of the site, for URLs
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="webmake_vars.html">The ${WebMake.*} Magic Variables</a> - information about the environment WebMake is run in, such as the version of WebMake, the timestamp, the user who ran it, etc.
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_07-fmt_converters.html">Format Converters</a></h2><ul>
                              <li>
                                <p>
                                  <a href="ettext.html">The Text::EtText Format Converter</a> - A simple plain-text format, easily converted to HTML (format: <em>text/et</em>)
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="pod.html">The POD Format Converter</a> - Perl ''plain old documentation'' support (format: <em>text/pod</em>)
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="cleaner.html">The HTML Cleaner</a> - the HTML cleaning filter
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_075-cgi.html">Using WebMake.cgi</a></h2><ul>
                              <li>
                                <p>
                                  <a href="cgi.html">Using webmake.cgi</a> - How to use WebMake as a CGI script
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="cgiinstall.html">Installing webmake.cgi</a> - How to install the WebMake CGI script in your web server
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="cvshowto.html">Setting up CVS and ssh for webmake.cgi HOWTO</a> - A step-by-step guide to setting up version-control for your WebMake site
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="cgistart.html">Using webmake.cgi</a> - How to navigate and use the ''edit-in-browser'' interface
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_08-pod.html">Module Documentation</a></h2><ul>
                              <li>
                                <p>
                                  <a href="Content.pm.html">HTML::WebMake::Content</a> - module documentation
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="Main.pm.html">HTML::WebMake::Main</a> - module documentation
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="PerlCodeLibrary.pm.html">HTML::WebMake::PerlCodeLibrary</a> - module documentation
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_09-man.html">Manual Pages</a></h2><ul>
                              <li>
                                <p>
                                  <a href="webmake.html">webmake(1)</a> - manual page
                                </p>
                              </li>
                            </ul>
                          </li>
                          <li>
                             <h2><a href="index_10-perllib.html">Plugins and Libraries</a></h2><ul>
                              <li>
                                <p>
                                  <a href="csvtable_tag.wmk.html">csvtable_tag.wmk</a> - define a HTML table using comma-separated values
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="download_tag.wmk.html">download_tag.wmk</a> - Tag for quick download links to files
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="dump_vars.wmk.html">dump_vars.wmk</a> - dump all WebMake variables and content items
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="navtree.wmk.html">navtree.wmk</a> - WebMake tag to generate an alternative per-page sitemap
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="safe_tag.wmk.html">safe_tag.wmk</a> - Tag to ''make safe'' WebMake, EtText or HTML data
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="sitetree.wmk.html">sitetree.wmk</a> - WebMake tag to generate a per-page sitemap
                                </p>
                              </li>
                              <li>
                                <p>
                                  <a href="thumbnail_tag.wmk.html">thumbnail_tag.wmk</a> - Tag to create ''thumbnail'' links for photo albums
                                </p>
                              </li>
                            </ul>
                          </li>
                        </ul>
                        <hr />
                        <hr size="4" />
                        <h1>Contents for the 'Introduction' section</h1><ul>
                          <li>
                            <p>
                              <a href="blurb.html">The Blurb</a> - What it is, and what it does
                            </p>
                          </li>
                          <li>
                            <p>
                              <a href="concepts.html">Concepts</a> - Concepts behind WebMake's design
                            </p>
                          </li>
                          <li>
                            <p>
                              <a href="making.html">WebMake Operation</a> - what happens when you run WebMake
                            </p>
                          </li>
                          <li>
                            <p>
                              <a href="firsttime.html">How to Migrate to WebMake</a> - how to write a WebMake file
                            </p>
                          </li>
                          <li>
                            <p>
                              <a href="invoking.html">Invoking Webmake</a> - how to run WebMake
                            </p>
                          </li>
                          <li>
                            <p>
                              <a href="cms.html">WebMake as a CMS</a> - WebMake's content-management features, and shortcomings
                            </p>
                          </li>
                          <li>
                            <p>
                              <a href="using.html">Tips On Using WebMake</a> - Some tips on using WebMake
                            </p>
                          </li>
                          <li>
                            <p>
                              <a href="contributors.html">Contributors to WebMake</a> - Contributors to WebMake
                            </p>
                          </li>
                        </ul>
                        <hr />
                         <h2>The Blurb</h2><p>
                          WebMake is a simple content management system, based around a templating
                          system for HTML documents, with lots of built-in smarts about what a
                          "typical" informational website needs in the way of functionality; metadata,
                          sitemapping, navigational aids, and (of course) embedded perl code. ;)
                          
                        </p>
                        <ul>
                          <li>
                            <p>
                              <strong>Creates portable sites</strong>: It requires no dynamic scripting capabilities
                               on the server; WebMake sites can be deployed to a plain old FTP site
                               without any problems.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>No need to edit lots of files:</strong> A multi-level website can be generated
                               entirely from 1 WebMake file containing content, links to content files,
                               perl code (if needed), and output instructions. 
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Useful for team work:</strong> Since the file-to-page mapping is no longer
                               required, WebMake allows the separation of responsibilities between the
                               content editors, the HTML page designers, and the site architect. Only the
                               site architect needs to edit the WebMake file itself, or know perl or
                               WebMake code. Standard file access permissions can be used to restrict
                               editing by role.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Efficient:</strong> WebMake supports dependency checking, so a one-line change
                               to one source file will not regenerate your entire site -- unless it's
                               supposed to. Only the files that refer to that chunk of content, however
                               indirectly, will be modified.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Supports content conversion, on the fly:</strong> Text can be edited as
                               standard HTML, converted from plain text (see below), or converted from
                               any other format by adding a conversion method to the
                               WebMake::FormatConvert module.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Edit text as text, not as HTML:</strong> One of the built-in content conversion
                               modules is <a href="ettext.html">Text::EtText</a>, which provides an easy-to-edit,
                               easy-to-read and intuitive way to write HTML, based on the plain-text
                               markup conventions we've been using for years.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Rearrange your site in 30 seconds:</strong> Since URLs can be referred to
                               symbolically, pages can be moved around and URLs changed by changing just
                               one line. All references to that URL will then change automatically. This
                               is vaguely <a href="http://www.sfc.keio.ac.jp/~ted/XUsurvey/xuDation.html">Xanalogical</a>.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Scriptable:</strong> Content items and output URLs can be generated, altered,
                               or read in dynamically using perl code. Perl code can even be used to
                               generate other perl code to generate content/output URLs/etc.,
                               recursively. New tags can be defined and interpreted in perl.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Extensible:</strong> New tags (for use in content items or in the WebMake file
                               itself) can be added from perl code, providing what amounts to a
                               dynamically-loaded plugin API.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Inclusion of text:</strong> Content can incorporate other content items, simply
                               by referring to it's name. This is a form of <a href="http://www.sfc.keio.ac.jp/~ted/XUsurvey/xuDation.html">Xanadu-style transclusion</a>.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Edit content in your web browser:</strong> WebMake now includes webmake.cgi,
                               which provides a CGI front-end to editing and managing a WebMake site.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Site replication:</strong> with webmake.cgi's CVS integration, multiple copies
                               of the same site can be replicated, and changes made on any of the sites
                               will be automatically replicated to all the others.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>Version control:</strong> changes made to sites using webmake.cgi will be kept
                               under CVS version control, so older versions of the site can be "rolled
                               back" if necessary.
                              
                            </p>
                          </li>
                        </ul>
                        <p>
                          But enough of the bulleted lists. Here's where you should start:
                          
                        </p>
                        <ul>
                          <li>
                            <p>
                              First of all, read <a href="concepts.html">WebMake Concepts</a> for a quick
                               intro to the assumptions and concepts that are used in WebMake.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              Next, read <a href="making.html">WebMake Operation</a> for an overview
                               of how WebMake operates.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              Then, read <a href="firsttime.html">How To Migrate to WebMake</a> for a guide
                               to bringing an existing, simple web site into WebMake.
                              
                            </p>
                          </li>
                          <li>
                            <p>
                              After that, you just need to read the rest of the manual, which is mostly
                               reference text. Good luck!
                              
                            </p>
                          </li>
                        </ul>
                        <p>
                          
                        </p>
                      </p>
                      <hr noshade />
                       <h2>Concepts</h2><p>
                         <a name="top"></a><p>
                          Here's a list of the main concepts behind WebMake's design and implementation.
                          Before using WebMake, it'll probably help to have a read of this, so you
                          can understand where the functionality is coming from.
                          
                        </p>
                         <a name="1_Templating"><h3>1. Templating</h3></a><blockquote>
                          <p>
                            When you start working with the web, it's easy enough to write a few pages and
                             put them on your site. However, you quickly realise that they all look
                             different; there's nothing binding them together as one "site".
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            The next step is to add some common elements to tie the pages together, so you
                             add some header text or graphics, and maybe a table on one side listing the
                             other pages in the site, allowing your users to quickly find the other pages.
                             Maybe you add some information at the bottom of the page, describing who you
                             are, that kind of thing.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            After a while, you'll have quite a few pages, each with a different piece of
                             <strong>main content</strong>, but a lot of them sharing some, or all, of the shared
                             elements -- the <strong>templates</strong>.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            One day, you need to change the templates -- but there's no easy way to do
                             this, without manually editing each of the files and changing them by hand.
                             Wouldn't it be easier to just change this once, and be done with it?
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            That's one of the main features of WebMake: <strong>templating</strong>. It allows you to
                             define the templates in one place, then generate pages containing the
                             <strong>content</strong> wrapped in those templates.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            There's quite a few products that do this; WebMake differs in that it's
                             <em>very</em> flexible in how you can include your content text in the templates.
                             Often, other products are limited to just setting a header and a footer to be
                             added to each page; WebMake takes its cues from traditional UNIX tools by
                             allowing very deep recursion in its templating, so your templates can include
                             other templates, etc. etc.
                            
                          </p>
                        </blockquote>
                         <a name="2_Edit_Text_As_Text_Not_HTML"><h3>2. Edit Text As Text, Not HTML</h3></a><blockquote>
                          <p>
                            In some situations, you'll want to write HTML; but in others, text is
                             best, for ease of editing, and reading while you're editing. WebMake
                             supports <strong>Text::EtText</strong> and <strong>POD</strong> formats, converting them to
                             HTML on-the-fly.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            <strong>Text::EtText</strong> aims to support most of the de-facto conventions we've
                             been using in mail and in USENET for years, converting them into HTML
                             in a sensible way.
                            
                          </p>
                        </blockquote>
                         <a name="3_Breaking_Down_the_File_Per_Page_Mapping"><h3>3. Breaking Down the File-Per-Page Mapping</h3></a><blockquote>
                          <p>
                            Another annoyance comes from the default way a web servers serves web pages;
                             normally, each web page is loaded from a separate file.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            This is fine for some sites, but in other circumstances you might want to
                             produce lots of small pages, or include identical text in several pages; or
                             you may just prefer editing your entire site in one editor, rather than having
                             to switch from one window to another.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            WebMake allows you to specify several <strong>content items</strong> inside a single
                             <strong>WebMake .wmk file</strong> (the .wmk file uses WebMake's XML-based file format),
                             and/or load content from a data source, such as a comma-separated values file,
                             a directory tree, or (possibly in future) an SQL database.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            You can then include these content items into the generated web pages,
                             whichever way you wish, based on the outputs and templates you specify in the
                             WebMake file.
                            
                          </p>
                        </blockquote>
                         <a name="4_Support_URL_Changes"><h3>4. Support URL Changes</h3></a><blockquote>
                          <p>
                            At some stage, you may feel like rearranging your site, changing
                             one URL that's always bothered you, so that it becomes more aesthetically
                             pleasing or descriptive. Or maybe some directive might suddenly appear,
                             ordering you to do so for policy reasons (ugh). Whatever!
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            WebMake allows you to track output pages or media, such as images, or
                             non-WebMake generated pages, using URL references; references to the name
                             will be converted to the correct URL for that page or image.
                            
                          </p>
                        </blockquote>
                         <a name="5_Site_Mapping_and_Indices"><h3>5. Site Mapping and Indices</h3></a><blockquote>
                          <p>
                            The obvious next step is to allow site maps, indexes, and navigational
                             information to be generated automatically.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            WebMake accomplishes this using metadata; in other words, if you tag your
                             content items with information like its title, its "parent" content item,
                             and its precedence compared to its neighbours (to specify the order of items),
                             WebMake can automatically use this information to generate the following maps:
                            
                          </p>
                        </blockquote>
                        <ul>
                          <li>
                            <p>
                              <strong>dynamically-generated indexes</strong>, such as <a href="index.html">the front page of this
                               documentation</a>
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>site maps</strong>, such as <a href="docmap.html">this one of the WebMake documentation</a>
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>breadcrumb trails</strong>, as seen on <a href="http://www.yahoo.com/">
                               Yahoo!</a>
                            </p>
                          </li>
                          <li>
                            <p>
                              <strong>back/forward navigation links</strong>, as seen at the <a href="#top">top of
                               this page</a>
                            </p>
                          </li>
                        </ul>
                        <a name="6_HTML_Cleaning"><h3>6. HTML Cleaning</h3></a><blockquote>
                          <p>
                            Often, the HTML you'll have to work with may be crufty, with <em>img</em>
                             tags that have no size information, or other inefficiencies.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            WebMake includes a <strong>HTML cleaner</strong> which will rewrite your HTML until it
                             sparkles. It can also be turned off for a "HTML verite" effect, if you feel
                             so inclined. (Alright, it's also a little faster with the cleaner off. Not
                             much though ;)
                            
                          </p>
                        </blockquote>
                         <a name="7_Plugins_User_Defined_Tags_And_Perl_Code"><h3>7. Plugins, User-Defined Tags And Perl Code</h3></a><blockquote>
                          <p>
                            You can define your own tags, similar to how JSPs support taglibs; this
                             provides a way to add scripted components to your pages, without
                             making things too messy or confusing, or arbitrarily peppering code
                             into the text.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            Or, if you <em>like</em> peppering code into your text, WebMake provides support
                             for Perl code embedded directly into the text or WebMake file, similar to PHP,
                             ePerl, HTML::Mason, or ASPs. It also provides an API for that code to
                             examine or alter WebMake's behaviour.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            There's a plugin architecture as well, providing an easy way to load code on
                             demand from self-contained components.
                            
                          </p>
                        </blockquote>
                         <a name="8_The_Web_Is_Read_Mostly_Bake_Don_t_Fry"><h3>8. The Web Is "Read-Mostly": Bake, Don't Fry</h3></a><blockquote>
                          <p>
                            Several other similar web site management systems revolve around dynamic
                             code running on the web server, which assembles the pages as they're
                             requested by the client. In the terminology used <a href="http://www.salon.com/contact/staff/idk/print.html">by Ian Kallen of
                             Salon.Com</a>, they "fry" the pages on-demand.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            For most sites, the pages do not change based on which client is accessing
                             them, or if they do, they don't change entirely; perhaps an extra set of
                             links becomes available in the page footer allowing a logged-in user to make
                             modifications using CGI, or PHP or Perl code, but that would be it. The
                             page just isn't volatile enough to require continual re-generation for each
                             request.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            As a result, all this churning about, generating pages on the fly from its
                             raw components each time, is wasted; it just eats the server's CPU and
                             memory for no real gain, and introduces yet another breakage point
                             (databases, memory usage, the /. effect...) where things can go wrong, just
                             when you're not looking at it.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            WebMake takes the "baking" approach, generating virtually all its output
                             <em>before</em> the web server gets involved. The web site admin runs the
                             <code>webmake</code> command, and this generates the pages.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            Note that WebMake doesn't preclude dynamic content in the pages, however.
                             PHP, CGI, ASP or embedded Perl code can be used, and WebMake will not
                             interfere. In fact, a future version of WebMake will probably provide some
                             "fried" features of its own...
                            
                          </p>
                        </blockquote>
                         <a name="9_Site_Replication"><h3>9. Site Replication</h3></a><blockquote>
                          <p>
                            You can replicate web sites quickly, easily, and securely over the internet.
                             WebMake does this using CVS and SSH, two standard UNIX utilities that have
                             been used for years to do exactly the same thing for other types of data;
                             why not web sites?
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            A bonus of using CVS is that you also get seamless version control and
                             conflict management, so users can edit a WebMake site at any replicated
                             point, check in the changes, and it won't overwrite everyone else's
                             modifications.
                            
                          </p>
                        </blockquote>
                         <a name="10_Edit_In_Browser"><h3>10. Edit-In-Browser</h3></a><blockquote>
                          <p>
                            The WebMake distribution includes a CGI script which provides a simple
                             interface allowing a WebMake site to be edited over the web, and the changes
                             to be checked in to CVS. At the moment, it's not too user-friendly, so it's
                             not quite suitable for a newbie to use without some instruction -- but it's
                             getting there, and it'll improve.
                            
                          </p>
                        </blockquote>
                        <blockquote>
                          <p>
                            It's certainly handy for an experienced user who wishes to correct a typo or
                             add a new page to their site, without requiring command-line access to the
                             server; so if you check out your site in an internet cafe and spot a typo, you
                             can immediately fix it without downloading an SSH client! ;)
                            
                          </p>
                        </blockquote>
                        <p>
                          
                        </p>
                      </p>
                      <hr noshade />
                       <h2>WebMake Operation</h2><p>
                        First of all, WebMake relies on a <strong>WebMake file</strong>. This is an XML file, with
                        a filename ending in <strong>.wmk</strong>, containing most of the important data on the
                        structure, inputs and files that make up your site.
                        
                      </p>
                       <a name="Finding_The_WebMake_File"><h3>Finding The WebMake File</h3></a><p>
                        If you run WebMake without a <strong>-f</strong> or <strong>-R</strong> switch on its command-line,
                        it'll first search for a file ending with <strong>.wmk</strong> in the current directory,
                        then in the parent directory, and so on 'til it hits the root directory.
                        
                      </p>
                      <p>
                        You can specify exactly which file to build from by using the <strong>-f</strong> switch.
                        Alternatively if you use the <strong>-R</strong> switch, it'll search relative to the
                        filename specified on the command-line; this is <em>very</em> handy if you're
                        calling WebMake from a macro in your editor or IDE, as it means you don't even
                        have to be running the editor in the same working directory as the files
                        you're working on.
                        
                      </p>
                       <a name="The_WebMake_File_Structure"><h3>The WebMake File Structure</h3></a><p>
                        A WebMake file is made up of several conceptual chunks, as follows:
                        
                      </p>
                      <ul>
                        <li>
                          the header
                          
                        </li>
                        <li>
                          options and libraries (optional)
                          
                        </li>
                        <li>
                          inputs: searching directories and data sources
                          
                        </li>
                        <li>
                          inputs: content embedded directly inside the WebMake file
                          
                        </li>
                        <li>
                          <a href="metadata.html">metadata</a> (optional)
                          
                        </li>
                        <li>
                          catalog generation (optional)
                          
                        </li>
                        <li>
                          outputs
                          
                        </li>
                        <li>
                          the footer
                          
                        </li>
                      </ul>
                      <p>
                        <strong>The header</strong>: Every WebMake file must start with a <a href="format.html"><strong>&lt;webmake&gt;</strong></a> tag.
                        
                      </p>
                      <p>
                        <strong>Options and libraries</strong>: Quite often, you may want to use some of the <a href="use.html">optional plug-ins</a> provided with WebMake, or occasionally, you
                        might need to <a href="option.html">set options</a> to control WebMake's
                        behaviour. The top of the WebMake file is a good place to do this.
                        
                      </p>
                      <p>
                        <strong>Inputs: searching directories and data sources</strong>: The important bit!
                        WebMake allows you to load <a href="contents.html">content text</a>, <a href="templates.html">HTML templates</a>, or <a href="media.html">URLs of media
                        files</a> (such as images), from directories in the filesystem.
                        
                      </p>
                      <p>
                        <strong>Inputs embedded in the WebMake file</strong>: Another key area. <a href="content.html">Content text</a>, <a href="template.html">HTML templates</a> and
                        tables of small items of <a href="contenttable.html">content</a> or <a href="metatable.html">metadata</a> can be embedded directly into the WebMake file,
                        for ease of editing.
                        
                      </p>
                      <p>
                        <strong>Metadata</strong>: If you want your site to contain pages which list details about,
                        or links to, other pages, generated on-the-fly, <a href="metadata.html">metadata</a> is
                        the way to do it. WebMake supports several ways of tagging your content with
                        <a href="metadata.html">metadata</a> to provide this. Metadata can be <a href="wmmeta.html">embedded into the
                        content text</a>, or <a href="metatable.html"> tagged onto the content</a> after
                        its already been declared.
                        
                      </p>
                      <p>
                        <strong>Catalog generation</strong>: once you've tagged your content text with <a href="metadata.html">metadata</a>,
                        WebMake can generate catalogs -- indexes, sitemaps, and the like -- from this.
                        Built-in catalog types include <a href="sitemap.html">a site map</a>, <a href="navlinks.html">back and forward navigation links</a>, and <a href="breadcrumbs.html">"breadcrumb trails"</a>. You can also write your own <a href="perl.html">Perl</a> code to generate custom indexes using the <a href="PerlCodeLibrary.pm.html">library functions</a>, if you prefer.
                        
                      </p>
                      <p>
                        <strong>Outputs</strong>: Finally, all that data needs to be written somewhere. The <a href="out.html">out</a> tag takes care of this. Each <a href="out.html">out</a> block
                        is roughly equivalent to a <em>target</em> in traditional UNIX <em>make(1)</em>
                        terminology; the text inside the tag is expanded (by expanding <a href="content_refs.html">${content references}</a>) and written to the
                        named file. Since quite a lot of output is typically almost identical in
                        terms of the templates it uses and they way it converts the output filename to
                        the name of the content text to insert, the <a href="for.html">for tag</a> is
                        useful here to automate the process.
                        
                      </p>
                      <p>
                        <strong>The footer</strong>: Finally, the WebMake file ends with a 
                        <a href="format.html"><strong>&lt;/webmake&gt;</strong></a> tag.
                        
                      </p>
                       <a name="Which_Outputs_Are_Created"><h3>Which Outputs Are Created?</h3></a><p>
                        Normally, all outputs named in the WebMake file are scanned, and possibly
                        re-generated. However, if a target has been specified on the command line,
                        only that file will be "made".
                        
                      </p>
                       <a name="Dependencies_And_Other_Optimisations"><h3>Dependencies And Other Optimisations</h3></a><p>
                        "Making" the target is not the end of it -- strictly speaking, the target
                        may or may not be updated. WebMake tracks the dependencies of each file, and
                        if these have not changed, the file will not be rebuilt.
                        
                      </p>
                      <p>
                        That's the first optimisation. However it doesn't always work; if some of the
                        file's text is generated by, or depends on text that contains dynamic Perl
                        code, WebMake will always have to rebuild the file, as it cannot determine
                        exactly what the Perl code is going to do!
                        
                      </p>
                      <p>
                        To avoid continually "churning" the file, regenerating it every time WebMake
                        is run, a comparison step takes place. Before the file is written to disk,
                        WebMake compares the file in memory with the file on disk; if there are no
                        changes, the on-disk file will not be modified in any way. This means tools
                        like <em>rsync(1)</em>, <em>rdist(1)</em> or even <em>make(1)</em> itself will work fine with
                        a WebMake site.
                        
                      </p>
                      <p>
                        All of these optimisations can be overridden by using the <strong>-F</strong> (freshen)
                        command-line switch; this will force output whether or not the files have
                        changed.
                        
                      </p>
                       <a name="Ensuring_A_Seamless_Transition"><h3>Ensuring A Seamless Transition</h3></a><p>
                        A very large (or very complicated) WebMake site can take a while to update.
                        To avoid broken links while updating the site, WebMake generates all output
                        into temporary files called <strong><em>filename</em>.new</strong>; once all the output
                        has been generated, these are renamed into place. This minimises the
                        time during which there may be inconsistencies in the site.
                        
                      </p>
                       <a name="Caching"><h3>Caching</h3></a><p>
                        Since WebMake uses dependencies to avoid rebuilding the entire site
                        every time, it needs to cache <a href="metadata.html">metadata</a> and dependency information
                        somewhere.
                        
                      </p>
                      <p>
                        Currently this data is stored in a file called <strong><em>filename</em>/cache.db</strong>,
                        where <em>filename</em> is a sanitised version of the WebMake file's name, in the
                        <strong>.webmake</strong> subdirectory of your home directory.
                        
                      </p>
                      <p>
                        
                      </p>
                    </p>
                    <hr noshade />
                     <h2>How to Migrate to WebMake</h2><p>
                      Chances are, you already have a HTML site you wish to migrate to WebMake.
                      This document introduces WebMake's way of doing things, and how to go
                      about a typical migration.
                      
                    </p>
                     <a name="Place_The_WebMake_File"><h3>Place The WebMake File</h3></a><p>
                      First, pick a top-level directory for the site; that's where you'll place your
                      <strong>.wmk</strong> file. All the generated files should be beneath this directory. In
                      this example I'll call it <strong>index.wmk</strong>.
                      
                    </p>
                     <a name="Make_Templates"><h3>Make Templates</h3></a><p>
                      Next, identify the page templates used in the site. To keep it simple, let's
                      imagine you have only one look and feel on the pages, with the usual stuff in
                      it; high-level HTML document tags, such as &lt;html&gt;, &lt;head&gt;,
                      &lt;title&gt;, &lt;body&gt;, that kind of stuff. There may also be some
                      formatting, such as a &lt;table&gt; with a side column containing links, etc.,
                      or a top-of-page title. All of these are good candidates for moving into a
                      template. I typically call these templates something obvious like
                      <strong>page_template</strong> or <strong>sitename_template</strong>, where <strong>sitename</strong> is the name of
                      the site.
                      
                    </p>
                    <p>
                      For this example, let's imagine you have the HTML high-level tags and a page
                      title as your typical template items.
                      
                    </p>
                    <p>
                      So edit the <strong>index.wmk</strong> file, and add a template content item, by cutting
                      and pasting it from one of your pages. Instead of cutting and pasting the
                      <em>real</em> title, use a metadata reference:
                      <strong>$[this.title]</strong>. Also, replace the text of the page
                      with <strong>${page_text}</strong>; the plan is that, before this content item
                      will be referenced, this content item will have been set to the text you wish
                      to use.
                      
                    </p>
                  </p>
                  <pre>    &lt;webmake&gt;
    &lt;content name=page_template&gt;
      &lt;html&gt;&lt;head&gt;&lt;title&gt;$[this.title]&lt;/title&gt;&lt;/head&gt;
      &lt;body bgcolor=#ffffff&gt;&lt;h1&gt;$[this.title]&lt;/h1&gt;
      &lt;hr&gt;
        ${page_text}
      &lt;hr&gt;
      &lt;/body&gt;&lt;/html&gt;
    &lt;/content&gt;
</pre> <a name="Grab_The_Pages_Text"><h3>Grab The Pages' Text</h3></a><p>
                    Next, run through the pages you wish to WebMake-ify, and either:
                    
                  </p>
                  <ol>
                    <li>
                      <p>
                        move them into a "raw" subdirectory, from where WebMake can read them
                         with a <a href="contents.html">&lt;contents&gt;</a> tag, or;
                        
                      </p>
                    </li>
                    <li>
                      <p>
                        include them into the <strong>index.wmk</strong> file directly.
                        
                      </p>
                    </li>
                  </ol>
                  <p>
                    It's a matter of taste; I initially preferred to do 1, but nowadays 2 seems
                    more convenient for editing, as it provides a very easy way to break up long
                    pages, and it makes search-and-replace easy. Anyway, it's up to you. I'll
                    illustrate using 2 in this example.
                    
                  </p>
                  <p>
                    Give each content item a name. I generally use the name of the HTML file, but
                    with a <strong>.txt</strong> extension instead of <strong>.html</strong>. This lets me mentally
                    differentiate the input from the output, but still lets me quickly see the
                    relationship between input file and output file.
                    
                  </p>
                  <p>
                    Strip the template elements (head tag, surrounding eye-candy tables, etc.)
                    from each page, leaving just the main text body behind. Keep the titles
                    around for later, though.
                    
                  </p>
                </p>
                <pre>    &lt;content name="document1.txt"&gt;
      ....your html here...
    &lt;/content&gt;
    &lt;content name="document2.txt"&gt;
      ....your html here...
    &lt;/content&gt;
    &lt;content name="document3.txt"&gt;
      ....your html here...
    &lt;/content&gt;
</pre> <a name="Convert_To_EtText_OPTIONAL"><h3>Convert To EtText (OPTIONAL!)</h3></a><p>
                  Now, one of the best bits of WebMake (in my opinion) is <a href="ettext.html">EtText</a>,
                  the built-in simple text markup language; to use this, run the command-line
                  tool <em>ethtml2text</em> on each of your HTML files to convert them
                  to EtText, then include that text, instead of the HTML, as the content items.
                  Don't forget to add <strong>format="text/et"</strong> to the content tag's attributes,
                  though:
                  
                </p>
              </p>
              <pre>    &lt;content name="document1.txt" format="text/et"&gt;
      ....your ettext here...
    &lt;/content&gt;
    ...
</pre><p>
                To keep things simple, I'll assume you haven't used EtText in the examples
                from now on.
                
              </p>
               <a name="Add_Titles"><h3>Add Titles</h3></a><p>
                Next, you need to set the titles in the content items, so that they can be
                used in higher-level templates, such as the <strong>page_template</strong> content item we
                defined earlier.
                
              </p>
              <p>
                To really get some power from WebMake, use metadata to do this.
                
              </p>
              <hr />
              <blockquote>
                <p>
                  <strong>What is Metadata?</strong>
                </p>
                <p>
                  A <em>metadatum</em> is like a normal content item, except it is exposed to other
                  pages in the <strong>index.wmk</strong> file. Normally, you cannot reliably read a dynamic
                  content item that was set from another page; if one content item sets a
                  variable like this:
                  
                </p>
              </p>
              <pre>    &lt;{set foo="Value!"}&gt;
</pre><p>
                Any content items evaluated after that variable is set can access
                <strong>${foo}</strong>, <em>as long as they occur on the same output page</em>.
                However if they occur on another output page, they may not be able to access
                <strong>${foo}</strong>.
                
              </p>
              <p>
                To get around this, WebMake includes <a href="wmmeta.html">the <strong>&lt;wmmeta&gt;</strong> tag</a>,
                which allows you to attach data to a content item. This data will then be
                accessible, both to other pages in the site (as
                <strong>$[<em>contentname</em>.<em>metaname</em>]</strong>, and to other content
                items within the same page (as <strong>$[this.<em>metaname</em>]</strong>).
                
              </p>
              <p>
                Think of them as like size, modification time, owner etc. on files. A good
                concept is that it's data used to generate catalogs or lists.
                
              </p>
            </blockquote>
            <hr />
            <p>
              Anyway, titles of pages are a perfect fit for metadata. So convert your
              page titles into &lt;wmmeta&gt; tags like so:
              
            </p>
          </p>
          <pre>    &lt;content name="document1.txt"&gt;
      &lt;wmmeta name="title"&gt;Your Title Here&lt;/wmmeta&gt;
      ....your ettext here...
    &lt;/content&gt;
    ...
</pre><p>
            (BTW it's not required that metadata be stored in the content text; it can
            also be loaded en masse from another location, such as the WebMake file, or
            another file altogether, using the <a href="metatable.html">&lt;metatable&gt;</a>
            directive. Again, it's a matter of taste.)
            
          </p>
          <p>
            Sometimes, for example if you plan to generate index pages or a sitemap, you
            may wish to add a one-line summary of the content item as a metadatum called
            <strong>abstract</strong>. I'll leave it out of the examples, just to keep them simple.
            
          </p>
          <p>
            Metadata may seem like a lot of bother, but it's a perfect fit when you need to
            generate pages that list links to, or details about, the pages in your site.
            
          </p>
          <p>
            It should always be referred to in <strong>$[square
            brackets]</strong>. I'll explain why later on.
            
          </p>
           <a name="Naming_The_Output_URLs"><h3>Naming The Output URLs</h3></a><p>
            Finally, you've assembled all the content items; now to tell WebMake
            where they should go. This is accomplished using the &lt;out&gt; tag.
            
          </p>
          <p>
            Each output URL, in this example, requires the following content items:
            
          </p>
          <ul>
            <li>
              <p>
                <strong>${page_template}</strong>, which refers to:
                
              </p>
            </li>
            <li>
              <p>
                <strong>$[this.title]</strong>
              </p>
            </li>
            <li>
              <p>
                <strong>${page_text}</strong>
              </p>
            </li>
          </ul>
          <p>
            As you can see, both <strong>this.title</strong> and <strong>page_text</strong> rely on which output URL
            is being written, otherwise you'll wind up with lots of finished pages
            containing the same text. ;)
            
          </p>
          <p>
            There are several ways to deal with this.
            
          </p>
          <ol>
            <li>
              <p>
                Set a variable in the &lt;out&gt; text, using &lt;{set}&gt;, to the name
                 of the content item that should be used for the <strong>page_text</strong>.
                
              </p>
            </li>
            <li>
              <p>
                Derive the correct value for <strong>page_text</strong> using the name of the
                 &lt;out&gt; section itself.
                
              </p>
            </li>
          </ol>
          <p>
            The simplest way is the latter. WebMake defines a built-in "magic"
            variable, <a href="webmake_vars.html">${WebMake.OutName}</a>, which contains the
            <em>name</em> of the output URL. (Note that output URLs have both a name <em>and</em> a
            filename; you'll see why in the next section.)
            
          </p>
          <p>
            To do this, define another content item:
            
          </p>
        </p>
        <pre>    &lt;content name=out_helper&gt;
       &lt;{set page_text="${${WebMake.OutName}.txt}" }&gt;
       ${page_template}
    &lt;/content&gt;
</pre> <a name="What_Does_That_Do"><h3>What Does That Do?</h3></a><p>
          Line 2, in the example above, needs an explanation.
          
        </p>
        <p>
          This takes the name of the output URL (as discussed above), using a content
          reference: <strong>${WebMake.OutName}</strong>. For example, let's say the
          page was named <strong>pageurl</strong>.
          
        </p>
      </p>
      <pre>    &lt;{set page_text="${<b>${WebMake.OutName}</b>.txt}" }&gt;
</pre><p>
        <b>${WebMake.OutName}</b> expands to <strong>pageurl</strong>:
        
      </p>
    </p>
    <pre>    &lt;{set page_text="${<b>pageurl</b>.txt}" }&gt;
</pre><p>
      It then appends <strong>.txt</strong> to the end:
      
    </p>
  </p>
  <pre>    &lt;{set page_text="<b>${pageurl.txt}</b>" }&gt;
</pre><p>
    and expands that as a <a href="content_refs.html">content reference</a>.
    
  </p>
</p>
<pre>    &lt;{set page_text="<b><i>...entire text of page...</i></b>" }&gt;
</pre><p>
  Finally, it stores that in a content item called <strong>page_text</strong>.
  
</p>
<p>
  This looks pretty complicated -- and it is. But the important thing is that,
  as in traditional UNIX style, it's also a very powerful way to do templating
  and variable interpolation; once you get the hang of it, there's plenty more
  stuff it can do. 
  
</p>
<p>
  BTW: you could simply skip defining this "helper" content item altogether,
  and just go to the top of the file and change the template to refer directly
  to <strong>${${WebMake.OutName}.txt}</strong> instead of
  <strong>${page_text}</strong> . That's what I usually do.
  
</p>
 <a name="What_s_With_the_Square_Brackets"><h3>What's With the Square Brackets?</h3></a><p>
  But what about the title? Handily, since we defined the titles as metadata,
  and referred to them as <strong>$[this.title]</strong> in <strong>page_template</strong>,
  this is taken care of; once the <strong>${page_text}</strong> reference is
  expanded, <strong>$[this.title]</strong> will be set.
  
</p>
<p>
  Remember I mentioned that metadata should always be referred to in
  <strong>$[square brackets]</strong>? Here's why. Square bracket
  references, or <a href="deferred_content_refs.html"><em>deferred references</em></a>, are
  evaluated only after <a href="content_refs.html">normal, "squiggly bracket" content references</a>.
  
</p>
<p>
  The example page contains the following content references:
  
</p>
<ul>
  <li>
    <p>
      <strong>${page_template}</strong>, which refers to:
      
    </p>
  </li>
  <li>
    <p>
      <strong>$[this.title]</strong>
    </p>
  </li>
  <li>
    <p>
      <strong>${page_text}</strong>
    </p>
  </li>
</ul>
<p>
  Since <strong>${page_text}</strong> is a normal content reference, it will be
  expanded first; and when it's expanded, the &lt;wmmeta&gt; tag setting
  <strong>title</strong> will be encountered. This will cause <strong>this.title</strong> to be set.
  
</p>
<p>
  Once all the normal content references are expanded, WebMake runs through
  the deferred references, causing <strong>$[this.title]</strong> to
  be expanded.
  
</p>
<p>
  If <strong>page_template</strong> had used a normal content reference to refer to
  <strong>${this.title}</strong>, WebMake would have tried to expand it before
  <strong>${page_text}</strong>, since it appeared in the file earlier.
  
</p>
<p>
  Anyway, I digress.
  
</p>
 <a name="Writing_The_lt_out_gt_Tags"><h3>Writing The &lt;out&gt; Tags</h3></a><p>
  Each output URL needs an &lt;out&gt; tag, with a <em>name</em> and a <em>file</em>. The
  <em>name</em> provides a symbolic name which one can use to refer to the URL; the
  <em>file</em> names the file that the output should be written to.
  
</p>
<p>
  Typically the name should be similar to the page's main content item's name,
  to keep things simple and allow the shortcut detailed in the previous section
  to work.
  
</p>
<p>
  Also, sites typically use a pretty similar filename to the name, for obvious
  reasons. At least, they do, to start with; further down the line, you may
  need to move one (or more) pages around in the URL or directory hierarchy;
  since you've been referring to them by name, instead of by URL or by filename,
  this means changing only one attribute in the &lt;out&gt; tag, instead of
  trying to do a global search and replace throughout hundreds of HTML files.
  
</p>
<p>
  Anyway, here's a sample &lt;out&gt; tag:
  
</p>
</p>
<pre>    &lt;out name="document1" file="document1.html"&gt; ${out_helper} &lt;/out&gt;
</pre><p>
  But what about multiple outputs? Two choices:
  
</p>
<ol>
  <li>
    <p>
      Simply list all the output HTML files, one after the other.
       Works fine for small sites, and it's simple.
      
    </p>
  </li>
  <li>
    <p>
      Use a <a href="for.html">&lt;for&gt;</a> tag.
      
    </p>
  </li>
</ol>
<p>
  I don't think you need to see how 1. works, it's pretty obvious.
  Let's see how 2. does it:
  
</p>
</p>
<pre>    &lt;for name="page" values="document1 document2 document3"&gt;
      &lt;out name="${page}" file="${page}.html"&gt; ${out_helper} &lt;/out&gt;
    &lt;/for&gt;
</pre><p>
  The important thing here, is that any references to <strong>${page}</strong> inside
  the <strong>&lt;for&gt;</strong> block, will be replaced with the name of the current item
  in the <strong>values</strong> list.
  
</p>
 <a name="Putting_lt_out_gt_Names_To_Work"><h3>Putting &lt;out&gt; Names To Work</h3></a><p>
  So you've named the output URLs. However all your content items contain
  static URLs in the HREFs! Let's fix that.
  
</p>
<p>
  This really is up to you; it's a global search-and-replace. Let's say
  you want to fix all links to "document1.html". Replace this:
  
</p>
</p>
<pre>    &lt;a href="document1.html"&gt;foo&lt;/a&gt;
</pre><p>
  with an <a href="url_refs.html">URL reference</a>, like this:
  
</p>
</p>
<pre>    &lt;a href="$(document1)"&gt;foo&lt;/a&gt;
</pre><p>
  Now, even if "document1.html" is renamed to "blah/whatever/doc1.cgi", you
  won't have to do a search-and-replace again.
  
</p>
 <a name="Getting_Advanced_Adding_Navigation_and_a_Sitemap"><h3>Getting Advanced - Adding Navigation and a Sitemap</h3></a><p>
  This hasn't been written yet. Sorry!
  
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>Invoking Webmake</h2><p>
  WebMake can be run using the command-line tool <a href="webmake.html">webmake</a>, using
  <a href="cgi.html">webmake.cgi</a>, or by using the Perl module <em>HTML::WebMake::Main</em>.
  
</p>
<p>
  In addition the EtText format can be used using its command line tools,
  or by using the Perl modules directly.
  
</p>
<p>
  The command-line tools' POD documentation:
  
</p>
<ul>
  <li>
    <p>
      <a href="webmake.html">webmake(1)</a>
    </p>
  </li>
</ul>
<p>
  And the POD documentation for the Perl module:
  
</p>
<ul>
  <li>
    <p>
      <a href="Main.pm.html">HTML::WebMake::Main</a>
    </p>
  </li>
</ul>
<p>
  
</p>
</p>
<hr noshade />
 <h2>WebMake as a CMS</h2><p>
  WebMake is, arguably, a Content Management System, or <a href="http://www.camworld.com/cms/">CMS</a>.
  
</p>
<p>
  To be more specific, it's oriented entirely towards generating a relatively
  static site, such as a weblog, a news site (without comments or
  personalisation) or a typical informational site.
  
</p>
<p>
  It does not have any dynamic, database-driven, features suitable for "live"
  sites that update frequently with dynamic data; nor does it have support for
  "personalisation" features, where the site displays different data based on
  what the user presents in their HTTP request. (Of course, using WebMake does
  not preclude using PHP, mod_perl, Mason etc. to provide these, however.)
  
</p>
<p>
  Here's the relevant details of what it can do.
  
</p>
 <a name="WebMake_s_CMS_Features"><h2>WebMake's CMS Features</h2></a><ul>
  <li>
    <p>
      <strong>Separation between content and layout</strong>
    </p>
  </li>
  <blockquote>
    <p>
      Since, logically, content and layout are entirely separate tasks, they
       should be easy to keep separate in the CMS.
      
    </p>
  </blockquote>
  <blockquote>
    <p>
      WebMake uses <a href="content_refs.html">content references</a> to include content into pages, and
       implement templating. This allows you to separate the content text from
       the template layout HTML; the template designers just need to include
       a content reference, such as <code>${body}</code>, instead of the
       text.
      
    </p>
  </blockquote>
  <li>
    <p>
      <strong>No requirement for text editors to know HTML</strong>
    </p>
  </li>
  <blockquote>
    <p>
      Only the layout staff should really <em>need</em> to know HTML, so the staff who
       provide text content can do this without HTML knowledge.
      
    </p>
  </blockquote>
  <blockquote>
    <p>
      WebMake provides <a href="ettext.html">Text::EtText</a>, which provides an
       easy-to-edit, easy-to-read and intuitive way to write HTML, based on the
       plain-text markup conventions we've been using for years.
      
    </p>
  </blockquote>
  <li>
    <p>
      <strong>Generation of pages automatically, using metadata from content items</strong>
    </p>
  </li>
  <blockquote>
    <p>
      It should be possible to generate index pages, sitemaps, navigation links,
       and other text automatically, based on properties and metadata of the
       pieces of content loaded.
      
    </p>
  </blockquote>
  <blockquote>
    <p>
      WebMake supports this by <a href="metadata.html">allowing any content item to carry arbitrary
       textual metadata</a>. Perl code can then be used to dynamically
       request a list of content items that have a particular set of metadata,
       and any page can refer to another content item's title, description,
       abstract etc. without itself needing to parse the content text.
      
    </p>
  </blockquote>
  <li>
    <p>
      <strong>Flexible URL support</strong>
    </p>
  </li>
  <blockquote>
    <p>
      It should be trivial to rearrange a site, if required, totally changing
       the URLs used in the site's pages.
      
    </p>
  </blockquote>
  <blockquote>
    <p>
      WebMake supports this by using <a href="url_refs.html">symbolic URL references</a>,
       which can be modified by changing one line, causing references to that
       URL throughout the site to change.
      
    </p>
  </blockquote>
  <li>
    <p>
      <strong>Edit-In-Page Functionality</strong>
    </p>
  </li>
  <blockquote>
    <p>
      Most CMSes boast a nice, browser-based user interface to creating, naming,
       uploading and filling out content items and media.
      
    </p>
  </blockquote>
  <blockquote>
    <p>
      WebMake now provides a <a href="cgistart.html">CGI script</a>, which allows a certain
       degree of web-based maintainance and content editing. It's not quite as
       foolproof as some of the bigger CMS systems, but it's a start!
      
    </p>
  </blockquote>
</ul>
<a name="What_WebMake_Is_Missing"><h2>What WebMake Is Missing</h2></a><ul>
  <li>
    <p>
      <strong>Database Support</strong>
    </p>
  </li>
  <blockquote>
    <p>
      It would be nice if WebMake could load content from a database. It
       currently cannot, although there's nothing in the architecture that would
       preclude this; there just has not been a need, just yet.
      
    </p>
  </blockquote>
  <blockquote>
    <p>
      Unfortunately, this may not be possible -- <a href="http://www.delphion.com/details?pn=US06026413__">this IBM software patent</a> details a mechanism whereby a server can dynamically rebuild its
       pages, based on changes to objects in a database. WebMake could run
       afoul of this if database support is added (although there are a few
       points where this could be avoided).
      
    </p>
  </blockquote>
  <li>
    <p>
      <strong>XSLT Support</strong>
    </p>
  </li>
  <blockquote>
    <p>
      This will definitely arrive -- as soon as a good XSLT engine becomes part
       of Perl, or at least becomes easy to install from CPAN. It's on my list ;)
      
    </p>
  </blockquote>
  <li>
    <p>
      <strong>Workflow</strong>
    </p>
  </li>
  <blockquote>
    <p>
      There's currently no logic to support workflow. This would not
       be difficult to add, though.
      
    </p>
  </blockquote>
</ul>
<p>
  
</p>
</p>
<hr noshade />
 <h2>Tips On Using WebMake</h2><p>
   <a name="Editor_IDE_Support"><h3>Editor/IDE Support</h3></a><p>
    The root directory of the WebMake distribution includes a <a href="http://www.vim.org/">Vim</a> rc file
    to support syntax-highlighting for WebMake. To use it, make a directory
    called <strong>.vim</strong> in your home directory, copy it there, and add the following
    lines to your <strong>.vimrc</strong>:
    
  </p>
  <pre>au BufNewFile,BufReadPost *.wmk so $HOME/.vim/webmake.vim
 map ,wm :w!&lt;CR&gt;:! <strong>/usr/local/bin/webmake</strong> -R %&lt;CR&gt;
</pre><p>
    Change <strong>/usr/local/bin/webmake</strong> to whatever the real path to the <code>webmake</code>
    command is.
    
  </p>
  <p>
    Once you do this, the macro sequence <strong>,wm</strong> will cause a rebuild of the site
    which contains the file you're currently editing. In addition, opening a
    file called <code>something.wmk</code> will automatically use WebMake syntax
    highlighting (if you have syntax highlighting enabled in VIM).
    
  </p>
   <a name="The_Button"><h3>The Button</h3></a><p>
    WebMake now includes a WebMake button:
    
  </p>
  <div align="center">
     <a href="http://webmake.taint.org/"><img src="images/BuiltWithWebMake.png" width="88" height="31" border="0" /></a>
  </div>
  <p>
    Feel free to include it on your pages; but please, if possible, add it with a
    href to <a href="http://webmake.taint.org/">http://webmake.taint.org/</a>, so people who are curious can find out more
    about WebMake.
    
  </p>
  <p>
    It's 88 pixels wide and 31 high, by the way. If you look in the "images"
    directory of the distribution, there's also an 130x45 one and a 173x60 one.
    
  </p>
  <p>
    To make things <strong>really</strong> easy, here's some cut-and-paste HTML
    for the image:
    
  </p>
  <p>
    <pre><!--etsafe-->
    
 &lt;a href="http://webmake.taint.org/"&gt;&lt;img
 src="http://webmake.taint.org/BuiltWithWebMake.png"
 width="88" height="31" border="0" /&gt;&lt;/a&gt;
<!--/etsafe-->
    </pre>
  </p>
  <p>
    
  </p>
</p>
<hr noshade />
 <h2>Contributors to WebMake</h2><p>
  Here's a list of people who've contributed to WebMake:
  
</p>
<ul>
  <li>
    <p>
      Justin Mason &lt;jm /at/ jmason.org&gt;: original author and maintainer
      
    </p>
  </li>
  <li>
    <p>
      Mark McLoughlin &lt;mark /at/ skynet.ie&gt;: added <code>perlout</code> directive,
       fixes to HTML cleaner
      
    </p>
  </li>
  <li>
    <p>
      Caolan McNamara &lt;caolan /at/ csn.ul.ie&gt;: EtText contributions;
       lists, pre-formatted text, lots of suggestions; he's written a <a href="http://www.csn.ul.ie/~caolan/Personal/Design.html">nice
       testimonial here</a>.
      
    </p>
  </li>
  <li>
    <p>
      Jan Hudec &lt;bulb /at/ ucw.cz&gt;: navtree plugin, patches to remove
       <a href="metadata.html">metadata</a> from site mapping and control mapping of media items
      
    </p>
  </li>
  <li>
    <p>
      Matthew Clarke &lt;clamat /at/ van.maves.ca&gt;: doco fix for datasource
       documentation
      
    </p>
  </li>
  <li>
    <p>
      rudif /at/ bluemail.ch: lots of help with supporting Windows
      
    </p>
  </li>
</ul>
<p>
  Thanks all! Patches and suggestions are welcomed -- <a href="http://webmake.taint.org/hacking.html">send them in</a>!
  (By the way, patch contributors get listed at the top, 'cos patches save
  me writing the code ;)
  
</p>
<p>
  
</p>
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Tags and Their Attributes' section</h1><ul>
  <li>
    <p>
      <a href="webmake_tag.html">The &lt;webmake&gt; Tag</a> - the webmake section
    </p>
  </li>
  <li>
    <p>
      <a href="include.html">The &lt;include&gt; Tag</a> - include another file into the current WebMake file
    </p>
  </li>
  <li>
    <p>
      <a href="use.html">The &lt;use&gt; Tag</a> - use a WebMake plugin
    </p>
  </li>
  <li>
    <p>
      <a href="content.html">The &lt;content&gt; Tag</a> - one chunk of textual content
    </p>
  </li>
  <li>
    <p>
      <a href="template.html">The &lt;template&gt; Tag</a> - non-text content, such as HTML templates
    </p>
  </li>
  <li>
    <p>
      <a href="contenttable.html">The &lt;contenttable&gt; Tag</a> - Define several small content items quickly, using a table
    </p>
  </li>
  <li>
    <p>
      <a href="contents.html">The &lt;contents&gt; Tag</a> - load many chunks of content from one data source
    </p>
  </li>
  <li>
    <p>
      <a href="templates.html">The &lt;templates&gt; Tag</a> - load many chunks of non-text content, such as HTML templates, from a data
      source
    </p>
  </li>
  <li>
    <p>
      <a href="media.html">The &lt;media&gt; Tag</a> - load many URLs from one data source
    </p>
  </li>
  <li>
    <p>
      <a href="datasources.html">Data Sources</a> - the protocols supported by &lt;contents&gt;, &lt;templates&gt; and &lt;media&gt;
    </p>
  </li>
  <li>
    <p>
      <a href="for.html">The &lt;for&gt; Tag</a> - iteration construct
    </p>
  </li>
  <li>
    <p>
      <a href="out.html">The &lt;out&gt; Tag</a> - an output file and URL
    </p>
  </li>
  <li>
    <p>
      <a href="sitemap.html">The &lt;sitemap&gt; Tag</a> - generate a site map
    </p>
  </li>
  <li>
    <p>
      <a href="navlinks.html">The &lt;navlinks&gt; Tag</a> - generate back and forward navigation links
    </p>
  </li>
  <li>
    <p>
      <a href="breadcrumbs.html">The &lt;breadcrumbs&gt; Tag</a> - generate a ''breadcrumb trail'' navigational aid
    </p>
  </li>
  <li>
    <p>
      <a href="cache.html">The &lt;cache&gt; Tag</a> - tell WebMake where to keep its cache files
    </p>
  </li>
  <li>
    <p>
      <a href="option.html">The &lt;option&gt; Tag</a> - set options controlling WebMake behaviour
    </p>
  </li>
  <li>
    <p>
      <a href="tags.html">Defining Tags</a> - defining tags for use in content items
    </p>
  </li>
</ul>
<hr />
 <h2>The &lt;webmake&gt; Tag</h2><p>
  The &lt;webmake&gt; section is required in a WebMake file. Any text
  before or after this section will be ignored.
  
</p>
<p>
  In the current implementation, you <em>can</em> leave these tags
  out, but it isn't advised; their requirement may be enforced later.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <!--etsafe-->
  <pre>
  &lt;webmake&gt;
    &#91;...WebMake file omitted...&#93;
  &lt;/webmake&gt;
</pre><!--/etsafe-->
  
</p>
<hr noshade />
 <h2>The &lt;include&gt; Tag</h2><p>
  Arbitrary files can be included into the current WebMake file
  using this tag. It has one attribute, <em>file</em>, which
  names the file to include.
  
</p>
<p>
  A set of libraries are available to include, distributed with
  WebMake. See the <em>Included Library Code</em> section of the <a href="index.html">index
  page</a> for their documentation. However, these
  should be loaded using the <a href="use.html">&lt;use&gt; tag</a> instead of this
  one.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <!--etsafe-->
  <pre>
  &lt;include file="inc/footer.wmk" /&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>The &lt;use&gt; Tag</h2><p>
  WebMake supports "plugin" libraries, which are generally other .wmk files or
  Perl modules which can be loaded to extend WebMake's functionality.
  
</p>
<p>
  For example, there are standard plugins to provide support for "download"
  links, which allows links to files including their size, ownership
  information, etc.; there's also a plugin which allows HTML tables to be
  defined using a comma-separated value list.
  
</p>
<p>
  It has one attribute, <em>plugin</em>, which names the plugin to load.
  
</p>
<p>
  Plugins can be loaded from the WebMake perl library directory, or from the
  user's home directory. The search path for a plugin is as follows:
  
</p>
<ul>
  <li>
    <p>
      <strong>~/.webmake/plugins/<em>plugin</em>.wmk</strong>
    </p>
  </li>
  <li>
    <p>
      <strong>${WebMake.PerlLib}/<em>plugin</em>.wmk</strong>
    </p>
  </li>
</ul>
<p>
  The set of standard plugins are listed in the <em>Included Library Code</em>
  section of the <a href="index.html">index page</a>.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <pre><!--etsafe-->
  
  &lt;use plugin="safe_tag" /&gt;
<!--/etsafe-->
  </pre>
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;content&gt; Tag</h2><p>
  The &lt;content&gt; tag has one required attribute: its name, which is used to
  substitute in that section's text, by inserting it in other sections or out
  tags in a <a href="content_refs.html">curly-bracket reference</a>, like so:
  
</p>
<blockquote>
  <p>
    ${foo}
    
  </p>
</blockquote>
<p>
  The following attributes are supported. These can also be set using the
  <a href="attrdefault.html">&lt;attrdefault&gt;</a> tag.
  
</p>
<dl>
  <dt>
    <em>format</em>
  </dt>
  <dd>
    <p>
      This allows the user to define what format the content
       is in. This allows markup languages other than HTML to be used;
       webmake will convert to HTML format, or other output formats, as
       required using the HTML::WebMake::FormatConvert module. The default
       value is "<em>text/html</em>". 
      
    </p>
  </dd>
  <dt>
    <em>asis</em>
  </dt>
  <dd>
    <p>
      This will block any interpretation of content or URL
       references in the content item, until after it has been converted into
       HTML format. This is useful for POD documentation, which may be
       embedded inside a file containing other text; without "asis", the
       text would be scanned for content references before the POD converter
       stripped out the extraneous bits. The default value is "<em>false</em>".
      
    </p>
  </dd>
  <dt>
    <em>map</em>
  </dt>
  <dd>
    <p>
      Whether the content item should be mapped in a <a href="sitemap.html">site
       map</a>, or not. The default value is "<em>true</em>".
      
    </p>
  </dd>
  <dt>
    <em>up</em>
  </dt>
  <dd>
    <p>
      The name of the content item which is this content item's
       parent, in the <a href="sitemap.html">site map</a>.
      
    </p>
  </dd>
  <dt>
    <em>isroot</em>
  </dt>
  <dd>
    <p>
      Whether or not this content item is the root of the
       <a href="sitemap.html">site map</a>. The default value is "<em>false</em>".
      
    </p>
  </dd>
</dl>
<p>
  If you wish to define a number of content sections at once, they can be
  searched for and loaded en masse using the <a href="contents.html">&lt;contents&gt;</a> tag.
  
</p>
<p>
  Every content item can have <a href="metadata.html">metadata</a> associated with it. See the
  <a href="metadata.html">metadata documentation</a> for details.
  
</p>
 <a name="Defining_Content_Items_On_The_Fly"><h1>Defining Content Items On-The-Fly</h1></a><p>
  The <a href="set.html">&lt;{set}&gt; processing instruction</a> can be used to define small
  pieces of content on the fly, from within other content or <a href="out.html">&lt;out&gt;
  sections</a>.
  
</p>
<p>
  In addition, Perl code can create content items using the <a href="PerlCodeLibrary.pm.html">set_content()</a>
  function.
  
</p>
 <a name="Using_Content_From_Perl_Code"><h1>Using Content From Perl Code</h1></a><p>
  Perl code can obtain the text of content items using the <a href="PerlCodeLibrary.pm.html">get_content()</a>
  function, and can treat content items as whitespace-separated lists using
  <a href="PerlCodeLibrary.pm.html">get_list()</a>.
  
</p>
<p>
  In addition, each content item has a range of properties and associated
  <a href="metadata.html">metadata</a>; the <a href="PerlCodeLibrary.pm.html">get_content_object()</a> method allows Perl code to retrieve
  an object of type <a href="Content.pm.html">HTML::WebMake::Content</a> representing the content
  item.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <pre><!--etsafe-->
  
  &lt;content name="foo" format="text/html"&gt;
  &lt;em&gt;This is a test.&lt;/em&gt;
  &lt;/content&gt;

  &lt;content name="bar" format="text/et"&gt;
  Still Testing
  -------------

  So is this!
  &lt;/content&gt;
<!--/etsafe-->
  </pre>
</p>
</p>
<hr noshade />
 <h2>The &lt;template&gt; Tag</h2><p>
  The &lt;template&gt; tag is identical in most respects to the
  <a href="content.html">&lt;content&gt;</a> tag.
  
</p>
<p>
  Typically, one will want to differentiate textual content, such as news
  articles, from template content, such as page templates. This tag allows
  those semantic differences to be expressed at a high level; use
  <a href="content.html">&lt;content&gt;</a> blocks for textual content, and
  &lt;template&gt; blocks for template content.
  
</p>
<p>
  It is implemented as a content item with the <code>map</code> attribute set to
  <code>false</code>.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <!--etsafe-->
  <pre>
  &lt;template name="page_header" format="text/html"&gt;
  &lt;html&gt;&lt;head&gt;&lt;title&gt; &#36;&#91;this.title&#93; &lt;/title&gt;&lt;/head&gt;
  &lt;/template&gt;

</pre><!--/etsafe-->
  
</p>
<hr noshade />
 <h2>The &lt;contenttable&gt; Tag</h2><p>
  Quite often, it's handy to define small (one-line) content items quickly, in
  bulk, directly inside the WMK file itself. The &lt;contenttable&gt; tag
  provides a good way to do this.
  
</p>
<p>
  Firstly, pick a delimiter character, such as <code>|</code>. Set the <em>delimiter</em>
  attribute to this character.
  
</p>
<p>
  Next, list a table of content names and their values, separated by a delimiter
  character, one name-value-pair per line.
  
</p>
<blockquote>
  <p>
    <em>Note:</em> if you would prefer to load the content items from a separate
     file, the <a href="contents.html">&lt;contents&gt;</a> tag is better suited.
    
  </p>
</blockquote>
<blockquote>
  <p>
    <em>Another note:</em> this is not the way to define data <em>about</em> other content
     items (in other words, <strong><a href="metadata.html">metadata</a></strong>), such as titles, authorship, or brief
     descriptions, as WebMake's built-in <a href="metadata.html">metadata</a> support will not be available
     in that case. Embedding the <a href="metadata.html">metadata</a> into the content item using
     &lt;wmmeta&gt; tags, or loading them in bulk using &lt;metatable&gt; tags,
     should be used instead.
    
  </p>
</blockquote>
 <a name="Example"><h2>Example</h2></a><p>
  <pre><!--etsafe-->
  
  &lt;contenttable delimiter="|"&gt;
  person1|Justin
  person2|Catherine
  person3|The cat
  &lt;/contenttable&gt;
<!--/etsafe-->
  </pre>
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;contents&gt; Tag</h2><p>
  Content can be searched for using the &lt;contents&gt; tag, which allows you
  to search a <a href="datasources.html">data source</a> (directory, delimiter-separated-values file,
  database etc.) for a pattern.
  
</p>
<p>
  Apart from the fact that it loads many contents instead of one, it's otherwise
  identical to the <a href="content.html">content tag</a>; see that tag's documentation
  for details on what attributes are supported.
  
</p>
<p>
  <p>
     <a name="Attributes_Supported_By_Datasource_Tags"><h2>Attributes Supported By Datasource Tags</h2></a><dl>
      <dt>
        <em>src</em>
      </dt>
      <dd>
        <p>
          All datasources require this attribute, which
           specifies a protocol and path, in a URL-style syntax:
           <strong>protocol</strong>:<strong>path</strong> . file: is the default protocol, if none is
           specified.
          
        </p>
      </dd>
      <dt>
        <em>name</em>
      </dt>
      <dd>
        <p>
          This attribute is used to specify the pattern of data,
           under this path, which will be converted into content or media items.
           The part of the data's location which matches this name pattern will
           become the name of the item. Typically, WebMake glob patterns, such as "*.txt" or ".../*.html" are used.
          
        </p>
      </dd>
      <dt>
        <em>skip</em>
      </dt>
      <dd>
        <p>
          A pattern which should match filenames that should be
           skipped. Files that match this pattern will not be included as content
           or media items, or as metatables. Glob patterns, again, are
           used here.
          
        </p>
      </dd>
      <dt>
        <em>prefix</em>
      </dt>
      <dd>
        <p>
          The items' names can be further modified by specifying
           a <em>prefix</em> and/or <em>suffix</em>; these strings are prepended or
           appended to the raw name to make the name the content is given.
          
        </p>
      </dd>
      <dt>
        <em>suffix</em>
      </dt>
      <dd>
        <p>
          See above.
          
        </p>
      </dd>
      <dt>
        <em>namesubst</em>
      </dt>
      <dd>
        <p>
          a Perl-formatted s// substitution, which is used to
           convert source filenames to content names. See the example under
           <strong>The File: Protocol</strong>, below.
          
        </p>
      </dd>
      <dt>
        <em>nametr</em>
      </dt>
      <dd>
        <p>
          a Perl tr// translation, which is used to convert
           source filenames to content names.
          
        </p>
      </dd>
      <dt>
        <em>listname</em>
      </dt>
      <dd>
        <p>
          a name of a content item. This content item will be
           created, and will contain the names of all content items picked up by
           the <a href="contents.html">&lt;contents&gt;</a> or &lt;media&gt; search.
          
        </p>
      </dd>
      <dt>
        <em><a href="metatable.html">metatable</a></em>
      </dt>
      <dd>
        <p>
          a search pattern, similar to <em>name</em> above, which
           provides filenames from which metadata will be loaded.
          
        </p>
      </dd>
    </dl>
    <p>
      In addition, the attributes supported by the <a href="content.html">content tag</a> can
      be specified as attributes to <a href="contents.html">&lt;contents&gt;</a>, including
      <em>format</em>, <em>up</em>, <em>map</em>, etc.
      
    </p>
    <p>
      Also, the attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag
      can be used if you've specified a <em><a href="metatable.html">metatable</a></em> attribute.
      
    </p>
    <p>
      The content blocks picked up from a <a href="contents.html">&lt;contents&gt;</a> search can
      also contain meta-data, such as headlines, visibilty dates, workflow approval
      statuses, etc. by including <a href="wmmeta.html">metadata</a>.
      
    </p>
    <p>
      
    </p>
  </p>
  <p>
     <a name="file"> <a name="The_file_Protocol"><h2>The file: Protocol</h2></a></a><p>
      The file: protocol loads content from a directory; each file is made into one
      content chunk. The <em>src</em> attribute indicates the source directory, the
      <em>name</em> attribute indicates the <a href="globs.html">glob pattern</a> that will pick up the
      content items in question.
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="*.txt" /&gt;
        
      </p>
    </blockquote>
    <p>
      The filename of the file will be used as the content chunk's name -- unless
      you use the <em>namesubst</em> command; see below for details on this.
      
    </p>
    <p>
      Note that, for efficiency, the files in question are not actually opened until
      their content chunks are referenced using ${name} or
      get_content("name").
      
    </p>
     <a name="Searching_Recursively_Through_A_Directory_Tree"><h3>Searching Recursively Through A Directory Tree</h3></a><p>
      Normally only the top level of files inside the <em>src</em> directory are added to
      the content set. However, if the <em>name</em> pattern starts with <strong>.../</strong>, the
      directory will be searched recursively:
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="<strong>.../</strong>*.txt" /&gt;
        
      </p>
    </blockquote>
    <p>
      The resulting content items will contain the full path from that directory
      down, i.e. the file <strong>stories/dir1/foo/bar.txt</strong> exists, the example above
      would define a content item called <strong>${dir1/foo/bar.txt}</strong>.
      
    </p>
     <a name="The_namesubst_Option"><h3>The namesubst Option</h3></a><p>
      If you use the <em>namesubst</em> command, the filename will be modified using that
      substitution, to give the content item's name. So, for example, this contents
      tag:
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="*.txt" namesubst="s/.txt//" /&gt;
        
      </p>
    </blockquote>
    <p>
      will load these example files as follows:
      
    </p>
    <p>
      <blockquote>
        <table>
          <tr>
            <th>
               <em>Filename</em>
            </th>
            <th>
               <em>Content Name</em>
            </th>
          </tr>
          <tr>
            <td>
               stories/index.txt 
            </td>
            <td>
               ${index} 
            </td>
          </tr>
          <tr>
            <td>
               stories/foo.txt 
            </td>
            <td>
               ${foo} 
            </td>
          </tr>
          <tr>
            <td>
               stories/directory/bar.txt 
            </td>
            <td>
               ${directory/bar} 
            </td>
          </tr>
          <tr>
            <td>
               stories/zz/gum/baz.txt 
            </td>
            <td>
               ${zz/gum/baz} 
            </td>
          </tr>
        </table>
      </blockquote>
    </p>
     <a name="Loading_Metadata_Using_the_Metatable_Attribute"><h3>Loading Metadata Using the Metatable Attribute</h3></a><p>
      You can now load metadata from external files while searching a directory tree
      for content items or media files. This allows you to load image titles, etc.
      from files which match the filename pattern you specify in the <em><a href="metatable.html">metatable</a></em>
      attribute.
      
    </p>
    <p>
      The attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag can be
      used in the datasource tag's attribute set, if you've specified a
      <em><a href="metatable.html">metatable</a></em> attribute, allowing you to define the format of the
      <a href="metatable.html">metatable</a> files you expect to find.
      
    </p>
    <p>
      There's one major difference between normal metatables and metatables
      found via a data source; the names in this kind of <a href="metatable.html">metatable</a> refer to
      the content or media object's <em>filename</em>, not its <em>content name</em>.
      
    </p>
    <p>
      In other words, the names of any content items referred to in the <a href="metatable.html">metatable</a>
      files will be modified, as follows:
      
    </p>
    <ul>
      <li>
        <p>
          if the <em>name</em> attribute contains <code>.../</code>, then the content items
           could be deep in a subdirectory. The <a href="metatable.html">metatable</a> file does not have
           to contain the full path to the content item's name; it can just
           contain the item's filename <em>relative to the <a href="metatable.html">metatable</a> itself</em>.
          
        </p>
      </li>
      <li>
        <p>
          if a <em>namesubst</em> or <em>nametr</em> function is specified, the content
           names in the <a href="metatable.html">metatable</a> will be processed with this. Again, this
           means that the <a href="metatable.html">metatable</a> data just has to provide the <em>filename</em>,
           not whatever the resulting content item will be called.
          
        </p>
      </li>
    </ul>
    <p>
      These features will hopefully make the operation a little more intuitive, as
      users who add files to a media or contents directory will not have to figure
      out what the resulting content item will be called; they can just refer to
      them by their filename, when tagging them with metadata.
      
    </p>
    <p>
      
    </p>
  </p>
  <p>
     <a name="svfile"> <a name="The_svfile_Protocol"><h2>The svfile: Protocol</h2></a></a><p>
      The svfile: protocol loads content from a delimiter-separated-file; the
      <em>src</em> attribute is the name of the file, the <em>name</em> is the <a href="globs.html">glob
      pattern</a> used to catch the relevant content items. The <em>namefield</em>
      attribute specifies the field number (counting from 1) which the <em>name</em>
      pattern is matched against, and the <em>valuefield</em> specifies the number of
      the field from which the content chunk is read. The <em>delimiter</em>
      attribute specifies the delimiter used to separate values in the file.
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="svfile:stories.csv" name="*"
         namefield=1 valuefield=2 delimiter="," /&gt;
        
      </p>
    </blockquote>
    <p>
      
    </p>
  </p>
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <!--etsafe-->
  <pre>
  &lt;contents src="file:raw/text" name=".../*.txt" format="text/et" /&gt;
  &lt;contents src="file:raw/html" name=".../*.html" format="text/html" /&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>The &lt;templates&gt; Tag</h2><p>
  The &lt;templates&gt; tag is identical in most respects to the
  <a href="contents.html">&lt;contents&gt;</a> tag.
  
</p>
<p>
  Typically, one will want to differentiate textual content, such as news
  articles, from template content, such as page templates. This tag allows
  those semantic differences to be expressed at a high level; use
  <a href="contents.html">&lt;contents&gt;</a> directives for textual content, and
  &lt;templates&gt; directives for template content.
  
</p>
<p>
  It is implemented as a contents directive with the <code>map</code> attribute set to
  <code>false</code>.
  
</p>
<p>
  <p>
     <a name="Attributes_Supported_By_Datasource_Tags"><h2>Attributes Supported By Datasource Tags</h2></a><dl>
      <dt>
        <em>src</em>
      </dt>
      <dd>
        <p>
          All datasources require this attribute, which
           specifies a protocol and path, in a URL-style syntax:
           <strong>protocol</strong>:<strong>path</strong> . file: is the default protocol, if none is
           specified.
          
        </p>
      </dd>
      <dt>
        <em>name</em>
      </dt>
      <dd>
        <p>
          This attribute is used to specify the pattern of data,
           under this path, which will be converted into content or media items.
           The part of the data's location which matches this name pattern will
           become the name of the item. Typically, WebMake glob patterns, such as "*.txt" or ".../*.html" are used.
          
        </p>
      </dd>
      <dt>
        <em>skip</em>
      </dt>
      <dd>
        <p>
          A pattern which should match filenames that should be
           skipped. Files that match this pattern will not be included as content
           or media items, or as metatables. Glob patterns, again, are
           used here.
          
        </p>
      </dd>
      <dt>
        <em>prefix</em>
      </dt>
      <dd>
        <p>
          The items' names can be further modified by specifying
           a <em>prefix</em> and/or <em>suffix</em>; these strings are prepended or
           appended to the raw name to make the name the content is given.
          
        </p>
      </dd>
      <dt>
        <em>suffix</em>
      </dt>
      <dd>
        <p>
          See above.
          
        </p>
      </dd>
      <dt>
        <em>namesubst</em>
      </dt>
      <dd>
        <p>
          a Perl-formatted s// substitution, which is used to
           convert source filenames to content names. See the example under
           <strong>The File: Protocol</strong>, below.
          
        </p>
      </dd>
      <dt>
        <em>nametr</em>
      </dt>
      <dd>
        <p>
          a Perl tr// translation, which is used to convert
           source filenames to content names.
          
        </p>
      </dd>
      <dt>
        <em>listname</em>
      </dt>
      <dd>
        <p>
          a name of a content item. This content item will be
           created, and will contain the names of all content items picked up by
           the <a href="contents.html">&lt;contents&gt;</a> or &lt;media&gt; search.
          
        </p>
      </dd>
      <dt>
        <em><a href="metatable.html">metatable</a></em>
      </dt>
      <dd>
        <p>
          a search pattern, similar to <em>name</em> above, which
           provides filenames from which metadata will be loaded.
          
        </p>
      </dd>
    </dl>
    <p>
      In addition, the attributes supported by the <a href="content.html">content tag</a> can
      be specified as attributes to <a href="contents.html">&lt;contents&gt;</a>, including
      <em>format</em>, <em>up</em>, <em>map</em>, etc.
      
    </p>
    <p>
      Also, the attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag
      can be used if you've specified a <em><a href="metatable.html">metatable</a></em> attribute.
      
    </p>
    <p>
      The content blocks picked up from a <a href="contents.html">&lt;contents&gt;</a> search can
      also contain meta-data, such as headlines, visibilty dates, workflow approval
      statuses, etc. by including <a href="wmmeta.html">metadata</a>.
      
    </p>
    <p>
      
    </p>
  </p>
  <p>
     <a name="file"> <a name="The_file_Protocol"><h2>The file: Protocol</h2></a></a><p>
      The file: protocol loads content from a directory; each file is made into one
      content chunk. The <em>src</em> attribute indicates the source directory, the
      <em>name</em> attribute indicates the <a href="globs.html">glob pattern</a> that will pick up the
      content items in question.
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="*.txt" /&gt;
        
      </p>
    </blockquote>
    <p>
      The filename of the file will be used as the content chunk's name -- unless
      you use the <em>namesubst</em> command; see below for details on this.
      
    </p>
    <p>
      Note that, for efficiency, the files in question are not actually opened until
      their content chunks are referenced using ${name} or
      get_content("name").
      
    </p>
     <a name="Searching_Recursively_Through_A_Directory_Tree"><h3>Searching Recursively Through A Directory Tree</h3></a><p>
      Normally only the top level of files inside the <em>src</em> directory are added to
      the content set. However, if the <em>name</em> pattern starts with <strong>.../</strong>, the
      directory will be searched recursively:
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="<strong>.../</strong>*.txt" /&gt;
        
      </p>
    </blockquote>
    <p>
      The resulting content items will contain the full path from that directory
      down, i.e. the file <strong>stories/dir1/foo/bar.txt</strong> exists, the example above
      would define a content item called <strong>${dir1/foo/bar.txt}</strong>.
      
    </p>
     <a name="The_namesubst_Option"><h3>The namesubst Option</h3></a><p>
      If you use the <em>namesubst</em> command, the filename will be modified using that
      substitution, to give the content item's name. So, for example, this contents
      tag:
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="*.txt" namesubst="s/.txt//" /&gt;
        
      </p>
    </blockquote>
    <p>
      will load these example files as follows:
      
    </p>
    <p>
      <blockquote>
        <table>
          <tr>
            <th>
               <em>Filename</em>
            </th>
            <th>
               <em>Content Name</em>
            </th>
          </tr>
          <tr>
            <td>
               stories/index.txt 
            </td>
            <td>
               ${index} 
            </td>
          </tr>
          <tr>
            <td>
               stories/foo.txt 
            </td>
            <td>
               ${foo} 
            </td>
          </tr>
          <tr>
            <td>
               stories/directory/bar.txt 
            </td>
            <td>
               ${directory/bar} 
            </td>
          </tr>
          <tr>
            <td>
               stories/zz/gum/baz.txt 
            </td>
            <td>
               ${zz/gum/baz} 
            </td>
          </tr>
        </table>
      </blockquote>
    </p>
     <a name="Loading_Metadata_Using_the_Metatable_Attribute"><h3>Loading Metadata Using the Metatable Attribute</h3></a><p>
      You can now load metadata from external files while searching a directory tree
      for content items or media files. This allows you to load image titles, etc.
      from files which match the filename pattern you specify in the <em><a href="metatable.html">metatable</a></em>
      attribute.
      
    </p>
    <p>
      The attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag can be
      used in the datasource tag's attribute set, if you've specified a
      <em><a href="metatable.html">metatable</a></em> attribute, allowing you to define the format of the
      <a href="metatable.html">metatable</a> files you expect to find.
      
    </p>
    <p>
      There's one major difference between normal metatables and metatables
      found via a data source; the names in this kind of <a href="metatable.html">metatable</a> refer to
      the content or media object's <em>filename</em>, not its <em>content name</em>.
      
    </p>
    <p>
      In other words, the names of any content items referred to in the <a href="metatable.html">metatable</a>
      files will be modified, as follows:
      
    </p>
    <ul>
      <li>
        <p>
          if the <em>name</em> attribute contains <code>.../</code>, then the content items
           could be deep in a subdirectory. The <a href="metatable.html">metatable</a> file does not have
           to contain the full path to the content item's name; it can just
           contain the item's filename <em>relative to the <a href="metatable.html">metatable</a> itself</em>.
          
        </p>
      </li>
      <li>
        <p>
          if a <em>namesubst</em> or <em>nametr</em> function is specified, the content
           names in the <a href="metatable.html">metatable</a> will be processed with this. Again, this
           means that the <a href="metatable.html">metatable</a> data just has to provide the <em>filename</em>,
           not whatever the resulting content item will be called.
          
        </p>
      </li>
    </ul>
    <p>
      These features will hopefully make the operation a little more intuitive, as
      users who add files to a media or contents directory will not have to figure
      out what the resulting content item will be called; they can just refer to
      them by their filename, when tagging them with metadata.
      
    </p>
    <p>
      
    </p>
  </p>
  <p>
     <a name="svfile"> <a name="The_svfile_Protocol"><h2>The svfile: Protocol</h2></a></a><p>
      The svfile: protocol loads content from a delimiter-separated-file; the
      <em>src</em> attribute is the name of the file, the <em>name</em> is the <a href="globs.html">glob
      pattern</a> used to catch the relevant content items. The <em>namefield</em>
      attribute specifies the field number (counting from 1) which the <em>name</em>
      pattern is matched against, and the <em>valuefield</em> specifies the number of
      the field from which the content chunk is read. The <em>delimiter</em>
      attribute specifies the delimiter used to separate values in the file.
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="svfile:stories.csv" name="*"
         namefield=1 valuefield=2 delimiter="," /&gt;
        
      </p>
    </blockquote>
    <p>
      
    </p>
  </p>
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <!--etsafe-->
  <pre>
  &lt;templates src="file:html_templates" name=".../*.html" format="text/html" /&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>The &lt;media&gt; Tag</h2><p>
  WebMake allows you to refer to files and web pages symbolically, separating
  the site layout from the URL structure, and avoiding later problems with
  dangling links when a page's URL is changed. This is done using <a href="url_refs.html">$(url_refs)</a>.
  
</p>
<p>
  This works well for content items defined in WebMake, such as output files
  defined using the <a href="out.html">&lt;out&gt;</a> tag. However it is not handy
  when dealing with a images or other files that are not
  generated using WebMake.
  
</p>
<p>
  Therefore media files, such as images, and external, non-WebMake-controlled
  files, can be searched for using the &lt;media&gt; tag. This tag allows you to
  search a <a href="datasources.html">data source</a> (directory, etc.) for a pattern.
  
</p>
<blockquote>
  <p>
    Note that data sources which do not map to files in a filesystem, or other
     methods accessible to a web browser browsing your site, do not make sense
     for the &lt;media&gt; tag; so, for example, the <em>svfile:</em> protocol is
     not supported, as a web browser cannot load an image from a CSV file.
     As a result, currently only one data source protocol can be used with
     the &lt;media&gt; tag, namely <em>file:</em>.
    
  </p>
</blockquote>
<p>
  <p>
     <a name="Attributes_Supported_By_Datasource_Tags"><h2>Attributes Supported By Datasource Tags</h2></a><dl>
      <dt>
        <em>src</em>
      </dt>
      <dd>
        <p>
          All datasources require this attribute, which
           specifies a protocol and path, in a URL-style syntax:
           <strong>protocol</strong>:<strong>path</strong> . file: is the default protocol, if none is
           specified.
          
        </p>
      </dd>
      <dt>
        <em>name</em>
      </dt>
      <dd>
        <p>
          This attribute is used to specify the pattern of data,
           under this path, which will be converted into content or media items.
           The part of the data's location which matches this name pattern will
           become the name of the item. Typically, WebMake glob patterns, such as "*.txt" or ".../*.html" are used.
          
        </p>
      </dd>
      <dt>
        <em>skip</em>
      </dt>
      <dd>
        <p>
          A pattern which should match filenames that should be
           skipped. Files that match this pattern will not be included as content
           or media items, or as metatables. Glob patterns, again, are
           used here.
          
        </p>
      </dd>
      <dt>
        <em>prefix</em>
      </dt>
      <dd>
        <p>
          The items' names can be further modified by specifying
           a <em>prefix</em> and/or <em>suffix</em>; these strings are prepended or
           appended to the raw name to make the name the content is given.
          
        </p>
      </dd>
      <dt>
        <em>suffix</em>
      </dt>
      <dd>
        <p>
          See above.
          
        </p>
      </dd>
      <dt>
        <em>namesubst</em>
      </dt>
      <dd>
        <p>
          a Perl-formatted s// substitution, which is used to
           convert source filenames to content names. See the example under
           <strong>The File: Protocol</strong>, below.
          
        </p>
      </dd>
      <dt>
        <em>nametr</em>
      </dt>
      <dd>
        <p>
          a Perl tr// translation, which is used to convert
           source filenames to content names.
          
        </p>
      </dd>
      <dt>
        <em>listname</em>
      </dt>
      <dd>
        <p>
          a name of a content item. This content item will be
           created, and will contain the names of all content items picked up by
           the <a href="contents.html">&lt;contents&gt;</a> or &lt;media&gt; search.
          
        </p>
      </dd>
      <dt>
        <em><a href="metatable.html">metatable</a></em>
      </dt>
      <dd>
        <p>
          a search pattern, similar to <em>name</em> above, which
           provides filenames from which metadata will be loaded.
          
        </p>
      </dd>
    </dl>
    <p>
      In addition, the attributes supported by the <a href="content.html">content tag</a> can
      be specified as attributes to <a href="contents.html">&lt;contents&gt;</a>, including
      <em>format</em>, <em>up</em>, <em>map</em>, etc.
      
    </p>
    <p>
      Also, the attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag
      can be used if you've specified a <em><a href="metatable.html">metatable</a></em> attribute.
      
    </p>
    <p>
      The content blocks picked up from a <a href="contents.html">&lt;contents&gt;</a> search can
      also contain meta-data, such as headlines, visibilty dates, workflow approval
      statuses, etc. by including <a href="wmmeta.html">metadata</a>.
      
    </p>
    <p>
      
    </p>
  </p>
  <p>
     <a name="file"> <a name="The_file_Protocol"><h2>The file: Protocol</h2></a></a><p>
      The file: protocol loads content from a directory; each file is made into one
      content chunk. The <em>src</em> attribute indicates the source directory, the
      <em>name</em> attribute indicates the <a href="globs.html">glob pattern</a> that will pick up the
      content items in question.
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="*.txt" /&gt;
        
      </p>
    </blockquote>
    <p>
      The filename of the file will be used as the content chunk's name -- unless
      you use the <em>namesubst</em> command; see below for details on this.
      
    </p>
    <p>
      Note that, for efficiency, the files in question are not actually opened until
      their content chunks are referenced using ${name} or
      get_content("name").
      
    </p>
     <a name="Searching_Recursively_Through_A_Directory_Tree"><h3>Searching Recursively Through A Directory Tree</h3></a><p>
      Normally only the top level of files inside the <em>src</em> directory are added to
      the content set. However, if the <em>name</em> pattern starts with <strong>.../</strong>, the
      directory will be searched recursively:
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="<strong>.../</strong>*.txt" /&gt;
        
      </p>
    </blockquote>
    <p>
      The resulting content items will contain the full path from that directory
      down, i.e. the file <strong>stories/dir1/foo/bar.txt</strong> exists, the example above
      would define a content item called <strong>${dir1/foo/bar.txt}</strong>.
      
    </p>
     <a name="The_namesubst_Option"><h3>The namesubst Option</h3></a><p>
      If you use the <em>namesubst</em> command, the filename will be modified using that
      substitution, to give the content item's name. So, for example, this contents
      tag:
      
    </p>
    <blockquote>
      <p>
        &lt;contents src="stories" name="*.txt" namesubst="s/.txt//" /&gt;
        
      </p>
    </blockquote>
    <p>
      will load these example files as follows:
      
    </p>
    <p>
      <blockquote>
        <table>
          <tr>
            <th>
               <em>Filename</em>
            </th>
            <th>
               <em>Content Name</em>
            </th>
          </tr>
          <tr>
            <td>
               stories/index.txt 
            </td>
            <td>
               ${index} 
            </td>
          </tr>
          <tr>
            <td>
               stories/foo.txt 
            </td>
            <td>
               ${foo} 
            </td>
          </tr>
          <tr>
            <td>
               stories/directory/bar.txt 
            </td>
            <td>
               ${directory/bar} 
            </td>
          </tr>
          <tr>
            <td>
               stories/zz/gum/baz.txt 
            </td>
            <td>
               ${zz/gum/baz} 
            </td>
          </tr>
        </table>
      </blockquote>
    </p>
     <a name="Loading_Metadata_Using_the_Metatable_Attribute"><h3>Loading Metadata Using the Metatable Attribute</h3></a><p>
      You can now load metadata from external files while searching a directory tree
      for content items or media files. This allows you to load image titles, etc.
      from files which match the filename pattern you specify in the <em><a href="metatable.html">metatable</a></em>
      attribute.
      
    </p>
    <p>
      The attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag can be
      used in the datasource tag's attribute set, if you've specified a
      <em><a href="metatable.html">metatable</a></em> attribute, allowing you to define the format of the
      <a href="metatable.html">metatable</a> files you expect to find.
      
    </p>
    <p>
      There's one major difference between normal metatables and metatables
      found via a data source; the names in this kind of <a href="metatable.html">metatable</a> refer to
      the content or media object's <em>filename</em>, not its <em>content name</em>.
      
    </p>
    <p>
      In other words, the names of any content items referred to in the <a href="metatable.html">metatable</a>
      files will be modified, as follows:
      
    </p>
    <ul>
      <li>
        <p>
          if the <em>name</em> attribute contains <code>.../</code>, then the content items
           could be deep in a subdirectory. The <a href="metatable.html">metatable</a> file does not have
           to contain the full path to the content item's name; it can just
           contain the item's filename <em>relative to the <a href="metatable.html">metatable</a> itself</em>.
          
        </p>
      </li>
      <li>
        <p>
          if a <em>namesubst</em> or <em>nametr</em> function is specified, the content
           names in the <a href="metatable.html">metatable</a> will be processed with this. Again, this
           means that the <a href="metatable.html">metatable</a> data just has to provide the <em>filename</em>,
           not whatever the resulting content item will be called.
          
        </p>
      </li>
    </ul>
    <p>
      These features will hopefully make the operation a little more intuitive, as
      users who add files to a media or contents directory will not have to figure
      out what the resulting content item will be called; they can just refer to
      them by their filename, when tagging them with metadata.
      
    </p>
    <p>
      
    </p>
  </p>
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <safe>
    <media src="file:images" name=".../*.gif" />
      <media src="file:images" name=".../*.jpg" />
        
      </safe>
    </p>
  </p>
  <hr noshade />
   <h2>Data Sources</h2><p>
    Contents or URLs can be searched for using the <a href="contents.html">&lt;contents&gt;</a>,
    <a href="templates.html">&lt;templates&gt;</a> or <a href="media.html">&lt;media&gt;</a> tags, which allow
    you to search a data source (directory, delimiter-separated-values file,
    database etc.) for a pattern.
    
  </p>
  <p>
    <a href="contents.html">&lt;contents&gt;</a> and <a href="media.html">&lt;media&gt;</a> tags can also pick
    up metadata from metatable files while searching for content or media items,
    using the <code>metatable</code> attribute.
    
  </p>
  <p>
    Currently two data source protocols are defined, <a href="#file">file:</a> and <a href="#svfile">svfile:</a> .
    
  </p>
  <p>
    <p>
       <a name="Attributes_Supported_By_Datasource_Tags"><h2>Attributes Supported By Datasource Tags</h2></a><dl>
        <dt>
          <em>src</em>
        </dt>
        <dd>
          <p>
            All datasources require this attribute, which
             specifies a protocol and path, in a URL-style syntax:
             <strong>protocol</strong>:<strong>path</strong> . file: is the default protocol, if none is
             specified.
            
          </p>
        </dd>
        <dt>
          <em>name</em>
        </dt>
        <dd>
          <p>
            This attribute is used to specify the pattern of data,
             under this path, which will be converted into content or media items.
             The part of the data's location which matches this name pattern will
             become the name of the item. Typically, WebMake glob patterns, such as "*.txt" or ".../*.html" are used.
            
          </p>
        </dd>
        <dt>
          <em>skip</em>
        </dt>
        <dd>
          <p>
            A pattern which should match filenames that should be
             skipped. Files that match this pattern will not be included as content
             or media items, or as metatables. Glob patterns, again, are
             used here.
            
          </p>
        </dd>
        <dt>
          <em>prefix</em>
        </dt>
        <dd>
          <p>
            The items' names can be further modified by specifying
             a <em>prefix</em> and/or <em>suffix</em>; these strings are prepended or
             appended to the raw name to make the name the content is given.
            
          </p>
        </dd>
        <dt>
          <em>suffix</em>
        </dt>
        <dd>
          <p>
            See above.
            
          </p>
        </dd>
        <dt>
          <em>namesubst</em>
        </dt>
        <dd>
          <p>
            a Perl-formatted s// substitution, which is used to
             convert source filenames to content names. See the example under
             <strong>The File: Protocol</strong>, below.
            
          </p>
        </dd>
        <dt>
          <em>nametr</em>
        </dt>
        <dd>
          <p>
            a Perl tr// translation, which is used to convert
             source filenames to content names.
            
          </p>
        </dd>
        <dt>
          <em>listname</em>
        </dt>
        <dd>
          <p>
            a name of a content item. This content item will be
             created, and will contain the names of all content items picked up by
             the <a href="contents.html">&lt;contents&gt;</a> or &lt;media&gt; search.
            
          </p>
        </dd>
        <dt>
          <em><a href="metatable.html">metatable</a></em>
        </dt>
        <dd>
          <p>
            a search pattern, similar to <em>name</em> above, which
             provides filenames from which metadata will be loaded.
            
          </p>
        </dd>
      </dl>
      <p>
        In addition, the attributes supported by the <a href="content.html">content tag</a> can
        be specified as attributes to <a href="contents.html">&lt;contents&gt;</a>, including
        <em>format</em>, <em>up</em>, <em>map</em>, etc.
        
      </p>
      <p>
        Also, the attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag
        can be used if you've specified a <em><a href="metatable.html">metatable</a></em> attribute.
        
      </p>
      <p>
        The content blocks picked up from a <a href="contents.html">&lt;contents&gt;</a> search can
        also contain meta-data, such as headlines, visibilty dates, workflow approval
        statuses, etc. by including <a href="wmmeta.html">metadata</a>.
        
      </p>
      <p>
        
      </p>
    </p>
    <p>
       <a name="file"> <a name="The_file_Protocol"><h2>The file: Protocol</h2></a></a><p>
        The file: protocol loads content from a directory; each file is made into one
        content chunk. The <em>src</em> attribute indicates the source directory, the
        <em>name</em> attribute indicates the <a href="globs.html">glob pattern</a> that will pick up the
        content items in question.
        
      </p>
      <blockquote>
        <p>
          &lt;contents src="stories" name="*.txt" /&gt;
          
        </p>
      </blockquote>
      <p>
        The filename of the file will be used as the content chunk's name -- unless
        you use the <em>namesubst</em> command; see below for details on this.
        
      </p>
      <p>
        Note that, for efficiency, the files in question are not actually opened until
        their content chunks are referenced using ${name} or
        get_content("name").
        
      </p>
       <a name="Searching_Recursively_Through_A_Directory_Tree"><h3>Searching Recursively Through A Directory Tree</h3></a><p>
        Normally only the top level of files inside the <em>src</em> directory are added to
        the content set. However, if the <em>name</em> pattern starts with <strong>.../</strong>, the
        directory will be searched recursively:
        
      </p>
      <blockquote>
        <p>
          &lt;contents src="stories" name="<strong>.../</strong>*.txt" /&gt;
          
        </p>
      </blockquote>
      <p>
        The resulting content items will contain the full path from that directory
        down, i.e. the file <strong>stories/dir1/foo/bar.txt</strong> exists, the example above
        would define a content item called <strong>${dir1/foo/bar.txt}</strong>.
        
      </p>
       <a name="The_namesubst_Option"><h3>The namesubst Option</h3></a><p>
        If you use the <em>namesubst</em> command, the filename will be modified using that
        substitution, to give the content item's name. So, for example, this contents
        tag:
        
      </p>
      <blockquote>
        <p>
          &lt;contents src="stories" name="*.txt" namesubst="s/.txt//" /&gt;
          
        </p>
      </blockquote>
      <p>
        will load these example files as follows:
        
      </p>
      <p>
        <blockquote>
          <table>
            <tr>
              <th>
                 <em>Filename</em>
              </th>
              <th>
                 <em>Content Name</em>
              </th>
            </tr>
            <tr>
              <td>
                 stories/index.txt 
              </td>
              <td>
                 ${index} 
              </td>
            </tr>
            <tr>
              <td>
                 stories/foo.txt 
              </td>
              <td>
                 ${foo} 
              </td>
            </tr>
            <tr>
              <td>
                 stories/directory/bar.txt 
              </td>
              <td>
                 ${directory/bar} 
              </td>
            </tr>
            <tr>
              <td>
                 stories/zz/gum/baz.txt 
              </td>
              <td>
                 ${zz/gum/baz} 
              </td>
            </tr>
          </table>
        </blockquote>
      </p>
       <a name="Loading_Metadata_Using_the_Metatable_Attribute"><h3>Loading Metadata Using the Metatable Attribute</h3></a><p>
        You can now load metadata from external files while searching a directory tree
        for content items or media files. This allows you to load image titles, etc.
        from files which match the filename pattern you specify in the <em><a href="metatable.html">metatable</a></em>
        attribute.
        
      </p>
      <p>
        The attributes supported by the <a href="metatable.html">&lt;metatable&gt;</a> tag can be
        used in the datasource tag's attribute set, if you've specified a
        <em><a href="metatable.html">metatable</a></em> attribute, allowing you to define the format of the
        <a href="metatable.html">metatable</a> files you expect to find.
        
      </p>
      <p>
        There's one major difference between normal metatables and metatables
        found via a data source; the names in this kind of <a href="metatable.html">metatable</a> refer to
        the content or media object's <em>filename</em>, not its <em>content name</em>.
        
      </p>
      <p>
        In other words, the names of any content items referred to in the <a href="metatable.html">metatable</a>
        files will be modified, as follows:
        
      </p>
      <ul>
        <li>
          <p>
            if the <em>name</em> attribute contains <code>.../</code>, then the content items
             could be deep in a subdirectory. The <a href="metatable.html">metatable</a> file does not have
             to contain the full path to the content item's name; it can just
             contain the item's filename <em>relative to the <a href="metatable.html">metatable</a> itself</em>.
            
          </p>
        </li>
        <li>
          <p>
            if a <em>namesubst</em> or <em>nametr</em> function is specified, the content
             names in the <a href="metatable.html">metatable</a> will be processed with this. Again, this
             means that the <a href="metatable.html">metatable</a> data just has to provide the <em>filename</em>,
             not whatever the resulting content item will be called.
            
          </p>
        </li>
      </ul>
      <p>
        These features will hopefully make the operation a little more intuitive, as
        users who add files to a media or contents directory will not have to figure
        out what the resulting content item will be called; they can just refer to
        them by their filename, when tagging them with metadata.
        
      </p>
      <p>
        
      </p>
    </p>
    <p>
       <a name="svfile"> <a name="The_svfile_Protocol"><h2>The svfile: Protocol</h2></a></a><p>
        The svfile: protocol loads content from a delimiter-separated-file; the
        <em>src</em> attribute is the name of the file, the <em>name</em> is the <a href="globs.html">glob
        pattern</a> used to catch the relevant content items. The <em>namefield</em>
        attribute specifies the field number (counting from 1) which the <em>name</em>
        pattern is matched against, and the <em>valuefield</em> specifies the number of
        the field from which the content chunk is read. The <em>delimiter</em>
        attribute specifies the delimiter used to separate values in the file.
        
      </p>
      <blockquote>
        <p>
          &lt;contents src="svfile:stories.csv" name="*"
           namefield=1 valuefield=2 delimiter="," /&gt;
          
        </p>
      </blockquote>
      <p>
        
      </p>
    </p>
    <p>
       <a name="Adding_New_Protocols"><h2>Adding New Protocols</h2></a><p>
        New data sources for &lt;contents&gt; and &lt;media&gt; tags are added by
        writing an implementation of the <em>DataSourceBase.pm</em> module, in the
        <em>HTML::WebMake::DataSources</em> package space (the
        <em>lib/HTML/WebMake/DataSources</em> directory of the distribution).
        
      </p>
      <p>
        Every data source needs a <em>protocol</em>, an alphanumeric lowercase identifier
        to use at the start of the <em>src</em> attribute to indicate that a data source is
        of that type.
        
      </p>
      <p>
        Each implementation of this module should implement these methods:
        
      </p>
      <dl>
        <dt>
          <code>new ($parent)</code>
        </dt>
        <dd>
          <p>
            instantiate the object, as usual.
            
          </p>
        </dd>
        <dt>
          <code>add ()</code>
        </dt>
        <dd>
          <p>
            add all the items in that data source as content
             chunks. (See below!)
            
          </p>
        </dd>
        <dt>
          <code>get_location_url ($location)</code>
        </dt>
        <dd>
          <p>
            get the location (in URL
             format) of a content chunk loaded by <code>add()</code>.
            
          </p>
        </dd>
        <dt>
          <code>get_location_contents ($location)</code>
        </dt>
        <dd>
          <p>
            get the contents of the
             location. The location, again, is the string provided by <code>add()</code>.
            
          </p>
        </dd>
        <dt>
          <code>get_location_mod_time ($location)</code>
        </dt>
        <dd>
          <p>
            get the current modification
             date of a location for dependency checking. The location, again, is
             in the format of the string provided by <code>add()</code>.
            
          </p>
        </dd>
      </dl>
      <p>
        Notes:
        
      </p>
      <ul>
        <li>
          <p>
            If you want <code>add()</code> to read the content immediately, call
             <code>$self->{parent}->add_text ($name, $text, $self->{src},
             $modtime)</code>.
            
          </p>
        </li>
        <li>
          <p>
            <code>add()</code> can defer opening and reading content chunks straight away.
             If it calls <code>$self->{parent}->add_location ($name, $location,
             $lastmod)</code>, providing a location string which starts with the data
             source's protocol identifier, the content will not be loaded until
             it is needed, at which point <code>get_location_contents()</code> is called.
            
          </p>
        </li>
        <li>
          <p>
            This location string should contain all the information needed to
             access that content chunk later, even if <code>add()</code> was not been
             called. Consider it as similar to a URL. This is required so that
             <code>get_location_mod_time()</code> (see below) can work.
            
          </p>
        </li>
        <li>
          <p>
            All implementations of <code>add()</code> should call <code>$fixed =
             $self->{parent}->fixname ($name);</code> to modify the name of each
             content chunk appropriately, followed by
             <code>$self->{parent}->add_file_to_list ($fixed);</code> to add the content
             chunk's name to the <em>filelist</em> content item.
            
          </p>
        </li>
        <li>
          <p>
            Data sources that support the &lt;media&gt; tag need to implement
             <code>get_location_url</code>, otherwise an error message will be output.
            
          </p>
        </li>
        <li>
          <p>
            Data sources that support the &lt;contents&gt; tag, and defer
             reading the content until it's required, need to implement
             <code>get_location_contents</code>, which is used to provide content from a
             location set using <code>$self->{parent}->add_location()</code>.
            
          </p>
        </li>
        <li>
          <p>
            Data sources that support the &lt;contents&gt; tag need to implement
             <code>get_location_mod_time</code>. This is used to support dependency
             checking, and should return the modification time (in UNIX
             <code>time_t</code> format) of that location. Note that since this is used
             to compare the modification time of a content chunk from the
             previous time webmake was run, and the current modification time,
             this is called before the <strong>real</strong> data source is opened.
            
          </p>
        </li>
      </ul>
      <p>
        
      </p>
    </p>
  </p>
  <p>
    
  </p>
  <hr noshade />
   <h2>The &lt;for&gt; Tag</h2><p>
    The &lt;for&gt; tag provides a quick way to iterate through a list of items.
    
  </p>
  <p>
    It requires two attributes, <em>name</em> and <em>values</em>; the content item named
    <em>name</em> is set to each space-separated value in the <em>values</em> string, and
    the text inside the block is processed.
    
  </p>
   <a name="Supported_Attributes"><h2>Supported Attributes</h2></a><dl>
    <dt>
      <em>name</em>
    </dt>
    <dd>
      <p>
        The name of the variable which will be set to each
         value in the <em>values</em> list in turn (if you know your comp-sci
         lingo, the iterator).
        
      </p>
    </dd>
    <dt>
      <em>values</em>
    </dt>
    <dd>
      <p>
        A space-separated list of values which is iterated
         through.
        
      </p>
    </dd>
    <dt>
      <em>namesubst</em>
    </dt>
    <dd>
      <p>
        A Perl s/// substitution; each value in the <em>values</em>
         list will be processed by this, if set.
        
      </p>
    </dd>
  </dl>
  <p>
    Variable references to <strong>${<em>name</em>}</strong> are processed immediately, so
    you can use this variable inside another variable reference, like this:
    <code>${all_${name}_text}</code> .
    
  </p>
   <a name="Example"><h2>Example</h2></a><p>
    Here's an example, taken from my own <a href="http://jmason.org/">home site</a>:
    
  </p>
  <p>
    <pre><!--etsafe-->
    
	&lt;!-- Create output for files in top dir --&gt;
	&lt;for name="out" values="index contact work nonwork home"&gt;
	  &lt;out file="&#36;{out}.html" name="&#36;{out}"&gt;
	    &#36;{jmason_template}
	  &lt;/out&gt;
	&lt;/for&gt;
<!--/etsafe-->
    </pre>
  </p>
  <p>
    
  </p>
</p>
<hr noshade />
 <h2>The &lt;out&gt; Tag</h2><p>
  The &lt;out&gt; tag is used to generate output. Surprise!
  
</p>
<p>
  It has one required attribute -- <em>file</em>, which defines the output file
  generated by this section. In addition it has some optional attributes, as
  follows:
  
</p>
<dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      which is used to substitute in that section's URL address, by
       inserting it in other sections or out tags in a <a href="url_refs.html">URL reference</a>, like
       so: $(out_foo) .
      
    </p>
  </dd>
</dl>
<p>
  More optional attributes are as follows. These ones also pick up defaults
  from the <a href="attrdefault.html">&lt;attrdefault&gt;</a> tag.
  
</p>
<dl>
  <dt>
    <em>format</em>
  </dt>
  <dd>
    <p>
      which defines the format the output is expected in
       (MIME-style). The default is <strong>text/html</strong>.
      
    </p>
  </dd>
  <dt>
    <em>clean</em>
  </dt>
  <dd>
    <p>
      specifies which features of the <a href="cleaner.html">HTML cleaner</a>
       to use. The <a href="cleaner.html">HTML cleaner</a> is a powerful filter which can polish grotty,
       messy HTML into fully-standards-compliant glory. The default value
       is <strong>all</strong>.
      
    </p>
  </dd>
  <dt>
    <em>ismainurl</em>
  </dt>
  <dd>
    <p>
      Whether this output file should be used as a "main
       URL" for any content items used within it, to support <a href="wmmeta.html">the <em>url</em> magic
       metadatum</a>. If you plan to have multiple output styles for
       your content, be sure to set "ismainurl=false" on the pages which use
       "alternative" styles. The default value is <strong>true</strong>.
      
    </p>
  </dd>
</dl>
<p>
  Perl code can also access out URLs using the <a href="PerlCodeLibrary.pm.html"><code>get_url()</code></a> function.
  
</p>
<p>
  The production of multiple out files that are more-or-less identical can be
  automated using the <a href="for.html">&lt;for&gt;</a> tag.
  
</p>
 <a name="Output_and_Dependencies"><h3>Output and Dependencies</h3></a><p>
  Out files will not be generated if the resulting text has not changed from the
  previous run, or if the content sections it depends on have not changed.
  
</p>
<p>
  The latter functionality is accomplished by caching the modification dates of
  each file from which content was read to generate the output file. If:
  
</p>
<ol>
  <li>
    <p>
      the output file exists,
      
    </p>
  </li>
  <li>
    <p>
      none of the files are newer than they were last time the output
       file was written,
      
    </p>
  </li>
  <li>
    <p>
      none of them are newer than the output file itself, and
      
    </p>
  </li>
  <li>
    <p>
      none of the content items contain dynamic content, such as Perl
       code or sitemaps, 
      
    </p>
  </li>
</ol>
<p>
  then it does not need to be rebuilt.
  
</p>
<blockquote>
  <p>
    <em>Note:</em> the <code>-r</code> switch to webmake, or the <code>risky_fast_rebuild</code>
     option to the <code>HTML::WebMake::Main</code> constructor, indicates that
     WebMake can take some risks when rebuilding. If this is on, then
     step 4. from the list above is ignored.
    
  </p>
</blockquote>
 <a name="Example"><h2>Example</h2></a><p>
  <pre><!--etsafe-->
  
  &lt;out name="index" file="index.html"&gt;
    &#36;{header}
    &#36;{index_text}
    &#36;{footer}
  &lt;/out&gt;
<!--/etsafe-->
  </pre>
</p>
</p>
<hr noshade />
 <h2>The &lt;sitemap&gt; Tag</h2><p>
  The &lt;sitemap&gt; tag is used to generate a content item containing a map,
  in a tree structure, of the current site.
  
</p>
<p>
  It does this by traversing every content item you have defined, looking for
  one tagged with a <strong>isroot=true</strong> attribute. This will become the root of the
  site map tree.
  
</p>
<p>
  While traversing, it also searches for content items with a <a href="metadata.html">metadatum</a> called <strong>up</strong>. This is used to tie all the content together into a
  tree structure.
  
</p>
<blockquote>
  <p>
    <em>Note:</em> content items that do not have an <strong>up</strong> <a href="metadata.html">metadatum</a> are considered
     children of the root by default. If you do not want to map a piece of
     content, declare it with the attribute <strong>map=false</strong>.
    
  </p>
</blockquote>
<p>
  By default, the content items are arranged by their score and title <a href="metadata.html">metadata</a>
  at each level. The sort criteria can be overridden by setting the
  <em>sortorder</em> attribute.
  
</p>
<blockquote>
  <p>
    <em>Note:</em> if you wish to include external HTML pages into the sitemap, you
     will need to load them as URL references using the &lt;media&gt; tag and use
     the &lt;metatable&gt; tag to associate <a href="metadata.html">metadata</a> with them.
     <em>t/data/sitemap_with_metatable.wmk</em> in the WebMake test suite demonstrates
     this. This needs more documentation (TODO).
    
  </p>
</blockquote>
<p>
  The &lt;sitemap&gt; tag takes the following required attributes:
  
</p>
<dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      The name of the sitemap item, used to refer to it
       later. Sitemaps are referred to, in other content items or in out
       files, using the normal ${foo} style of <a href="content.html">content reference</a>.
      
    </p>
  </dd>
  <dt>
    <em>node</em>
  </dt>
  <dd>
    <p>
      The name of the template item to evaluate for each
       node with children in the tree. See <strong>Processing</strong>, below.
      
    </p>
  </dd>
  <dt>
    <em>leaf</em>
  </dt>
  <dd>
    <p>
      The name of the template item to evaluate for each leaf
       node, ie. a node with no children, in the tree. See <strong>Processing</strong>,
       below.
      
    </p>
  </dd>
</dl>
<p>
  And the following optional attributes:
  
</p>
<dl>
  <dt>
    <em>rootname</em>
  </dt>
  <dd>
    <p>
      The root content item to start traversing at. The
       default root is whichever content item has the <strong>isroot</strong> attribute
       set to <strong>true</strong>.
      
    </p>
  </dd>
  <dt>
    <em>all</em>
  </dt>
  <dd>
    <p>
      Whether or not all content items should be mapped.
       Normally dynamic content, such as <a href="metadata.html">metadata</a> and perl-code-defined
       content items, are not included. (default: false)
      
    </p>
  </dd>
  <dt>
    <em>dynamic</em>
  </dt>
  <dd>
    <p>
      The name of the template item to evaluate for
       dynamic content items, required if the <em>all</em> attribute is set
       to <strong>true</strong>.
      
    </p>
  </dd>
  <dt>
    <em>grep</em>
  </dt>
  <dd>
    <p>
      Perl code to evaluate at each step of the tree.
       See the <em>Grep</em> section below.
      
    </p>
  </dd>
  <dt>
    <em>sortorder</em>
  </dt>
  <dd>
    <p>
      A <a href="sorting.html">sort string</a> specifying what <a href="metadata.html">metadata</a>
       should be used to sort the items in the tree, for example "<em>section
       score title</em>".
      
    </p>
  </dd>
</dl>
<p>
  Note that the <em>root</em> attribute is deprecated; use <em>rootname</em> instead.
  
</p>
<p>
  The sitemap can be declared either as an empty element, with <strong>/&gt;</strong> at the
  end, or with a pair of starting and ending tags and text between. If the
  sitemap is declared using the latter style, any text between the tags will be
  prepended to the generated site map. It's typically only useful if you wish
  to set <a href="metadata.html">metadata</a> on the map itself.
  
</p>
 <a name="Processing"><h1>Processing</h1></a><p>
  Here's the key to sitemap generation. Once the internal tree structure of the
  site has been determined, WebMake will run through each node from the root
  down up to 20 levels deep, and for each node, evaluate one of the 3 content
  items named in the &lt;sitemap&gt; tag's attributes:
  
</p>
<ol>
  <li>
    <p>
      <em>node</em>: For pages with pages beneath them;
      
    </p>
  </li>
  <li>
    <p>
      <em>leaf</em>: For "leaf" pages with no pages beneath them;
      
    </p>
  </li>
  <li>
    <p>
      <em>dynamic</em>: For dynamic content items, defined by perl code
       or <a href="metadata.html">metadata</a>.
      
    </p>
  </li>
</ol>
<p>
  By changing the template content items you name in the tag's attributes, you
  have total control over the way the sitemap is rendered. For efficiency,
  these should be declared using the &lt;template&gt; tag instead of the
  &lt;content&gt; tag.
  
</p>
<p>
  The following variables (ie. content items) are set for each node:
  
</p>
<dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      the content name
      
    </p>
  </dd>
  <dt>
    <em>title</em>
  </dt>
  <dd>
    <p>
      the content's <strong>Title</strong> <a href="metadata.html">metadatum</a>, if set
      
    </p>
  </dd>
  <dt>
    <em>score</em>
  </dt>
  <dd>
    <p>
      the content's <strong>Score</strong> <a href="metadata.html">metadatum</a>, if set
      
    </p>
  </dd>
  <dt>
    <em>list</em>
  </dt>
  <dd>
    <p>
      the text for all children of this node (<em>node</em>
       items only)
      
    </p>
  </dd>
  <dt>
    <em>is_node</em>
  </dt>
  <dd>
    <p>
      whether the content is a node or a leaf (1 for
       node, 0 for leaf)
      
    </p>
  </dd>
</dl>
<p>
  In addition, the following <a href="url_refs.html">URL reference</a> is set:
  
</p>
<dl>
  <dt>
    <em>url</em>
  </dt>
  <dd>
    <p>
      the first URL listed in a WebMake &lt;out&gt; tag
       to refer to the content item.
      
    </p>
  </dd>
</dl>
<p>
  Confused? Don't worry, there's an example below.
  
</p>
 <a name="Grep"><h1>Grep</h1></a><p>
  The <em>grep</em> attribute is used to filter which content items are included in
  the site map.
  
</p>
<p>
  The "grep" code is evaluated once for every node in the sitemap, and <code>$_</code>
  is the name of that node; you can then decide to display/not display it, as
  follows.
  
</p>
<p>
  <code>$_</code> is set to the current content item's name. If the perl code returns 0,
  the node is skipped; if the perl code sets the variable <code>$PRUNE</code> to 1, all
  nodes at this level and below are skipped.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  If you're still not sure how it works, take a look at <em>examples/sitemap.wmk</em>
  in the distribution. Here's the important bits from that file.
  
</p>
<p>
  Firstly, two content items are necessary -- a template for a sitemap node, and
  a template for a leaf. Note the use of <strong>$(url)</strong>,
  <strong>${title}</strong>, etc., which are filled in by the sitemap code.
  
</p>
<p>
  <pre>
	&lt;content name=sitemapnode map=false&gt;
	  &lt;li&gt;
	    &lt;a href=$(url)&gt;${title}&lt;/a&gt;: $[${name}.abstract]&lt;br&gt;
	    &lt;!-- don't forget to list the sub-items --&gt;
	    &lt;ul&gt; ${list} &lt;/ul&gt;
	  &lt;/li&gt;
	&lt;/content&gt;
</pre>
</p>
<p>
  And the template for the leaf nodes. Note that the <strong>${list}</strong>
  reference is not needed here.
  
</p>
<p>
  <pre>
	&lt;content name=sitemapleaf map=false&gt;
	  &lt;li&gt;
	    &lt;a href=$(url)&gt;${title}&lt;/a&gt;: $[${name}.abstract]&lt;br&gt;
	  &lt;/li&gt;
	  &lt;/li&gt;
	&lt;/content&gt;
</pre>
</p>
<p>
  Finally, the sitemap itself is declared.
  
</p>
<p>
  <pre>
	&lt;sitemap name=mainsitemap node=sitemapnode leaf=sitemapleaf /&gt;
</pre>
</p>
<p>
  From then on, it's just a matter of including the sitemap content item in
  an output file:
  
</p>
<p>
  <pre>
	&lt;out name=map file=sitemap_html/map.html&gt;
	  ${header}${mainsitemap}${footer}
	&lt;/out&gt;
</pre>
</p>
<p>
  And that's it.
  
</p>
<p>
  This documentation includes a sitemap, by the way. It's used to generate
  the navigation links. Take a look <a href="docmap.html">here</a>.
  
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;navlinks&gt; Tag</h2><p>
  A common site structure strategy is to provide <em>Back</em>, <em>Forward</em> and
  <em>Up</em> links between pages. This is especially frequent in papers or
  manuals, and (as you can see above) is used in this documentation.
  WebMake supports this using the &lt;<a href="navlinks.html">navlinks</a>&gt; tag.
  
</p>
<p>
  To use this, first define a <a href="sitemap.html">sitemap</a>. This tells WebMake how to order the page
  hierarchy, and which pages to include.
  
</p>
<p>
  Next, define 3 templates, one for <em>previous</em>, one for <em>next</em> and one
  for <em>up</em> links. These should contain references to <strong>${url}</strong>
  (note: <em>not</em> <strong>$(url)</strong>), which will be replaced with the URL for
  the next, previous, or parent content item, whichever is applicable for the
  direction in question.
  
</p>
<p>
  Also, references to <strong>${name}</strong> will be expanded to the name of the
  content item in that direction, allowing you to retrieve <a href="metadata.html">metadata</a> for that
  content like so: <strong>$[${name}.title]</strong> .
  
</p>
<p>
  You can also add templates to be used when there is no <em>previous</em>,
  <em>next</em> or <em>up</em> content item; for example, the "top" page of a site has
  no <em>up</em> content item. These are strictly optional though.
  
</p>
<p>
  Then add a <strong>&lt;<a href="navlinks.html">navlinks</a>&gt;</strong> tag to the WebMake file as follows.
  
</p>
<p>
  <pre>
	&lt;navlinks name=<em>mynavlinks</em> map=<em>sitemapname</em>
		up=<em>uptemplatename</em>
		next=<em>nexttemplatename</em>
		prev=<em>prevtemplatename</em>
		noup=<em>nouptemplatename</em>
		nonext=<em>nonexttemplatename</em>
		noprev=<em>noprevtemplatename</em>&gt;
	<em>content text</em>
	&lt;/navlinks&gt;
</pre>
</p>
<p>
  The content text acts just like a normal content item, but references to
  <strong>${nexttext}</strong>, <strong>${prevtext}</strong> or <strong>${uptext}</strong>
  will be replaced with the appropriate template; e.g. <strong>${uptext}</strong>
  will be replaced by either <strong>${<em>uptemplatename</em>}</strong> or
  <strong>${<em>nouptemplatename</em>}</strong> depending on if this is the top page or
  not.
  
</p>
<p>
  You can then add references to <strong>$[<em>mynavlinks</em>]</strong> in
  other content items, and the navigation links will be inserted.
  
</p>
<blockquote>
  <p>
    <em>Note:</em> <a href="navlinks.html">navlinks</a> content items <em>must</em> be included as a deferred
     reference!
    
  </p>
</blockquote>
 <a name="Attribute_Reference"><h1>Attribute Reference</h1></a><p>
  These are the attributes accepted by the <strong>&lt;<a href="navlinks.html">navlinks</a>&gt;</strong> tag.
  
</p>
<dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      the name of the navigation-links content item.
       Required.
      
    </p>
  </dd>
  <dt>
    <em>map</em>
  </dt>
  <dd>
    <p>
      the name of the <a href="sitemap.html">sitemap</a> used to determine page
       ordering. Required.
      
    </p>
  </dd>
  <dt>
    <em>up</em>
  </dt>
  <dd>
    <p>
      the name of the template used to draw <em>Up</em>
       links. Required.
      
    </p>
  </dd>
  <dt>
    <em>next</em>
  </dt>
  <dd>
    <p>
      the name of the template used to draw <em>Next</em>
       links. Required.
      
    </p>
  </dd>
  <dt>
    <em>prev</em>
  </dt>
  <dd>
    <p>
      the name of the template used to draw <em>Prev</em>
       links. Required.
      
    </p>
  </dd>
  <dt>
    <em>noup</em>
  </dt>
  <dd>
    <p>
      the name of the template used when there is
       no <em>Up</em> link, ie. for the page at the top level of the
       site. Optional -- the default is an empty string.
      
    </p>
  </dd>
  <dt>
    <em>nonext</em>
  </dt>
  <dd>
    <p>
      the name of the template used when there is
       no <em>Next</em> link, ie. the last page in the site.
       Optional -- the default is an empty string.
      
    </p>
  </dd>
  <dt>
    <em>noprev</em>
  </dt>
  <dd>
    <p>
      the name of the template used when there is
       no <em>Prev</em> link, ie. for the first page in the site.
       Optional -- the default is an empty string.
      
    </p>
  </dd>
</dl>
<a name="Example"><h2>Example</h2></a><p>
  This will generate an extremely simple set of &lt;a href&gt; links, no frills.
  The <a href="sitemap.html">sitemap</a> it uses isn't detailed here; see the <a href="sitemap.html">sitemap documentation</a> for details on how to make a site map.
  
</p>
<p>
  <pre>
	&lt;template name=up&gt;&lt;a href=${url}&gt;Up&lt;/a&gt;&lt;/template&gt;

	&lt;template name=next&gt;&lt;a href=${url}&gt;Next&lt;/a&gt;&lt;/template&gt;

	&lt;template name=prev&gt;&lt;a href=${url}&gt;Prev&lt;/a&gt;&lt;/template&gt;

	&lt;navlinks name=<em>name</em> map=<em>sitemapname</em> up=up next=next prev=prev&gt;
	  ${prevtext} | ${uptext} | ${nexttext}
	&lt;/navlinks&gt;
</pre>
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;breadcrumbs&gt; Tag</h2><p>
  Another common site navigation strategy is to provide what Jakob Nielsen has
  called a "breadcrumb trail". The &lt;breadcrumbs&gt; tag supports this.
  
</p>
 <a name="WTF_Is_A_Breadcrumb_Trail"><h1>WTF Is A Breadcrumb Trail?</h1></a><p>
  The "breadcrumb trail" is a piece of navigation text, displaying a list of
  the parent pages, from the top-level page right down to the current page.
  You've probably seen them before; take a look at this <a href="http://dir.yahoo.com/Business_and_Economy/Shopping_and_Services/Communication_and_Information_Management/Internet_and_World_Wide_Web/Portals/Personalized/">Yahoo
  category</a> for an example.
  
</p>
<p>
  To illustrate, here's an example. Let's say you're browsing the <em>Man Bites
  Dog</em> story in an issue of <em>Dogbiting Monthly</em>, which in turn is part of the
  <em>Bizarre Periodicals</em> site. Here's a hypothetical breadcrumb trail for that
  page:
  
</p>
<blockquote>
  <p>
    <em>Bizarre Periodicals</em> : <em>Dogbiting Monthly</em> : <em>Issue 24</em> : <em>Man
     Bites Dog</em>
  </p>
</blockquote>
<p>
  Typically those would be links, of course, so the user can jump right back to
  the contents page for Issue 24 with one click.
  
</p>
<p>
  If you have a site that contains pages that are more than 2 levels deep from
  the front page, you should consider using this to aid navigation.
  
</p>
 <a name="How_To_Use_It_With_WebMake"><h1>How To Use It With WebMake</h1></a><p>
  To use a breadcrumb trail, first define a <a href="sitemap.html">sitemap</a>. This tells WebMake how to
  order the page hierarchy, and which pages to include.
  
</p>
<p>
  Next, define a template to be used for each entry in the trail. This
  should contain references to <strong>${url}</strong> (note: <em>not</em> <strong>$(url)</strong>), which will be replaced with the URL for the page in
  question; and <strong>${name}</strong>, which will be expanded to the name of the
  "main" content item on that page, allowing you to retrieve metadata for that
  content like so: <strong>$[${name}.title]</strong> .
  
</p>
<blockquote>
  <p>
    <em>Note:</em> the "main" content item is defined as the first content
     item on the page which is not metadata, not perl-generated code, and
     has the <em>map</em> attribute set to <em>"true"</em>, ie. not a template.
    
  </p>
</blockquote>
<p>
  You can also define two more templates to be used at the <em>top</em> of the
  breadcrumb trail, ie. the root page, and at the <em>tail</em> of it, ie. the
  current page being viewed. These are optional though, and if not specified,
  the generic template detailed above will be used as a default.
  
</p>
<p>
  Then add a <strong>&lt;breadcrumbs&gt;</strong> tag to the WebMake file as follows.
  
</p>
<p>
  <pre>
	&lt;breadcrumbs name=<em>mycrumbs</em> map=<em>sitemapname</em>
		top=<em>toptemplatename</em>
		tail=<em>tailtemplatename</em>
		level=<em>leveltemplatename</em> /&gt;
</pre>
</p>
<p>
  The <em>top</em> and <em>tail</em> attributes are optional, as explained above.
  The <em>level</em> attribute, which names the "generic" breadcrumb template
  item to use for intermediate levels, is mandatory.
  
</p>
<p>
  You can then add references to <strong>$[<em>mycrumbs</em>]</strong> in
  other content items, and the breadcrumb-trail text will be inserted. <em>Note!</em>
  be sure to use a deferred reference, or the links may not appear!
  
</p>
 <a name="Attribute_Reference"><h1>Attribute Reference</h1></a><p>
  These are the attributes accepted by the <strong>&lt;breadcrumbs&gt;</strong> tag.
  
</p>
<dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      the name of the breadcrumb-trail content item.
       Required.
      
    </p>
  </dd>
  <dt>
    <em>map</em>
  </dt>
  <dd>
    <p>
      the name of the sitemap used to determine page
       hierarchy. Required.
      
    </p>
  </dd>
  <dt>
    <em>level</em>
  </dt>
  <dd>
    <p>
      the name of the template used to draw links at the
       intermediate levels of the trail. Required.
      
    </p>
  </dd>
  <dt>
    <em>top</em>
  </dt>
  <dd>
    <p>
      the name of the template used to draw the link to
       the top-most, or root, page. Optional -- <em>level</em> will be used as a
       fallback.
      
    </p>
  </dd>
  <dt>
    <em>tail</em>
  </dt>
  <dd>
    <p>
      the name of the template used to draw the link to
       the bottom-most, currently-viewed page. Optional -- <em>level</em> will be
       used as a fallback.
      
    </p>
  </dd>
</dl>
<a name="Example"><h2>Example</h2></a><p>
  This will generate an extremely simple set of &lt;a href&gt; links, no frills.
  The sitemap it uses isn't specified here; see the <a href="sitemap.html">sitemap tag documentation</a> for details on how to generate a site map.
  
</p>
<p>
  <pre>
  &lt;template name=btop&gt;
  	[ &lt;a href=${url}&gt;$[${name}.title]&lt;/a&gt; /
  &lt;/template&gt;
  &lt;template name=blevel&gt;
  	&lt;a href=${url}&gt;$[${name}.title]&lt;/a&gt; /
  &lt;/template&gt;
  &lt;template name=btail&gt;
  	&lt;a href=${url}&gt;$[${name}.title]&lt;/a&gt; ]
  &lt;/template&gt;
  &lt;breadcrumbs map=<em>sitemapname</em> name=crumbs
  	top=btop tail=btail level=blevel /&gt;
</pre>
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;cache&gt; Tag</h2><p>
  The &lt;cache&gt; tag takes one attribute, <em>dir</em>, which names the
  directory where the WebMake site cache is kept.
  
</p>
<p>
  WebMake will store data about the site in this directory in order
  to speed up later rebuilds of the site.
  
</p>
<p>
  The following special characters and escapes are supported:
  
</p>
<dl>
  <dt>
    <strong>~</strong>
  </dt>
  <dd>
    <p>
      the user's home directory on UNIX.
      
    </p>
  </dd>
  <dt>
    <strong>%u</strong>
  </dt>
  <dd>
    <p>
      the user's username.
      
    </p>
  </dd>
  <dt>
    <strong>%f</strong>
  </dt>
  <dd>
    <p>
      .wmk filename, non-alphanums replaced with _ .
      
    </p>
  </dd>
  <dt>
    <strong>%F</strong>
  </dt>
  <dd>
    <p>
      .wmk full path, non-alphanums replaced with _ .
      
    </p>
  </dd>
  <dt>
    <strong>%l</strong>
  </dt>
  <dd>
    <p>
      perl lib dir for plugins.
      
    </p>
  </dd>
</dl>
<p>
  The default setting is <code>~/.webmake/%F</code>.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <!--etsafe-->
  <pre>
  &lt;cache file="../webmake.cache" /&gt;
</pre><!--/etsafe-->
  
</p>
</p>
<hr noshade />
 <h2>The &lt;option&gt; Tag</h2><p>
  The &lt;option&gt; tag takes two attributes:
  
</p>
<dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      The name of the option;
      
    </p>
  </dd>
  <dt>
    <em>value</em>
  </dt>
  <dd>
    <p>
      The value to set it to.
      
    </p>
  </dd>
</dl>
<a name="Example"><h2>Example</h2></a><p>
  <!--etsafe-->
  <pre>
  &lt;option name="FileSearchPath" value="../files" /&gt;
</pre><!--/etsafe-->
  
</p>
</p>
<hr noshade />
 <h2>Defining Tags</h2><p>
  Like Roxen or Java Server Pages, WebMake allows you to define your own tags;
  these cause a perl function to be called whenever they are encountered in
  either content text, or inside the WebMake file itself.
  
</p>
 <a name="Defining_Content_Tags"><h2>Defining Content Tags</h2></a><p>
  You do this by calling the <a href="PerlCodeLibrary.pm.html#item_define_tag"><strong><code>define_tag()</code></strong></a> function from
  within a <a href="perl.html">&lt;{perl}&gt;</a> section in the WebMake file. This
  will set up a tag, and indicates a reference to the handler function to call
  when that tag is encountered, and the list of attributes that are required to
  use that tag.
  
</p>
<p>
  Any occurrences of this tag, with at least the set of attributes defined in
  the <strong><code>define_tag()</code></strong> call, will cause the handler function to be called.
  
</p>
<p>
  Handler functions are called as fcllows:
  
</p>
<p>
  <pre><!--etsafe-->
  
        handler (&#36;tagname, &#36;attrs, &#36;text, &#36;perlcodeself);
<!--/etsafe-->
  </pre>
</p>
<p>
  Where $tagname is the name of the tag, $attrs is a reference
  to a hash containing the attribute names and the values used in the tag, and
  $text is the text between the start and end tags.
  
</p>
<p>
  $perlcodeself is the PerlCode object, allowing you to write proper
  object-oriented code that can be run in a threaded environment or from
  mod_perl. This can be ignored if you like.
  
</p>
<p>
  Note that there are two variations, one for conventional tag pairs with a
  start and end tag, the other for stand-alone empty tags with no end tag. The
  latter variation is called <a href="PerlCodeLibrary.pm.html#item_define_empty_tag"><strong><code>define_empty_tag()</code></strong></a>.
  
</p>
<dl>
  <dt>
    <a href="PerlCodeLibrary.pm.html#item_define_empty_tag"><strong><code>define_empty_tag()</code></strong></a>
  </dt>
  <dd>
    <p>
      define a standalone
       content tag
      
    </p>
  </dd>
  <dt>
    <a href="PerlCodeLibrary.pm.html#item_define_tag"><strong><code>define_tag()</code></strong></a>
  </dt>
  <dd>
    <p>
      define a content tag with a
       start and end
      
    </p>
  </dd>
</dl>
<a name="Defining_WebMake_Tags"><h2>Defining WebMake Tags</h2></a><p>
  This is identical to using content tags, above, but the functions are as
  follows:
  
</p>
<dl>
  <dt>
    <a href="PerlCodeLibrary.pm.html#item_define_empty_wmk_tag"><strong><code>define_empty_wmk_tag()</code></strong></a>
  </dt>
  <dd>
    <p>
      define a
       standalone WebMake tag
      
    </p>
  </dd>
  <dt>
    <a href="PerlCodeLibrary.pm.html#item_define_wmk_tag"><strong><code>define_wmk_tag()</code></strong></a>
  </dt>
  <dd>
    <p>
      define a WebMake tag
       with a start and end
      
    </p>
  </dd>
</dl>
<a name="Example"><h2>Example</h2></a><p>
  Let's say you've got the following in your WebMake file.
  
</p>
<p>
  <pre><!--etsafe-->
  
  &lt;{perl
   define_tag ("thumb", \&amp;make_thumbnail, qw(img thumb));
  }&gt;

  &lt;content name="foo"&gt;
    &lt;thumb img="big.jpg" thumb="big_thumb.jpg"&gt;
      Picture of a big thing
    &lt;/thumb&gt;
  &lt;/content&gt;
<!--/etsafe-->
  </pre>
</p>
<p>
  When the <strong>foo</strong> content item comes to be included in an output file, the tag
  will be replaced with a call to a perl function, as follows:
  
</p>
<p>
  <pre><!--etsafe-->
  
  make_thumbnail ("thumb",
     { img =&gt; 'big.jpg', thumb =&gt; 'big_thumb.jpg' },
     'Picture of a big thing', &#36;perlcodeself);
<!--/etsafe-->
  </pre>
</p>
<p>
  Note that if the tag omitted one of the 2 required attributes, <em>img</em> or
  <em>thumb</em>, it would result in an error message.
  
</p>
<p>
  For more serious examples of tag definition, the WebMake distribution comes
  with several <a href="use.html">plugins</a>, such as <a href="safe_tag.wmk.html">safe_tag.wmk</a> which define their own tags.
  
</p>
<p>
  
</p>
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Processing Logic' section</h1><ul>
  <li>
    <p>
      <a href="order.html">The Order of Processing</a> - the order of processing
    </p>
  </li>
  <li>
    <p>
      <a href="set.html">The &lt;{set}&gt; Directive</a> - set a content chunk while inside another content chunk's scope
    </p>
  </li>
  <li>
    <p>
      <a href="perl.html">The &lt;{perl}&gt; Directives</a> - embed arbitrary perl logic
    </p>
  </li>
  <li>
    <p>
      <a href="globs.html">Globs and Regexps</a> - glob patterns, regular expressions and pattern matching
    </p>
  </li>
  <li>
    <p>
      <a href="sorting.html">Sorting Lists of Content Items</a> - how, and where, it is done
    </p>
  </li>
</ul>
<hr />
 <h2>The Order of Processing</h2><p>
  In order to fully control the WebMake file processing using Perl code, it's
  important to know the order in which the tags and so on are parsed.
  
</p>
 <a name="Parsing_of_the_WebMake_File"><h2>Parsing of the WebMake File</h2></a><p>
  Initially, WebMake used a set order of tag parsing, but this proved to be
  unwieldy and confusing. Now, it uses the order in which the tags are defined
  in the .wmk file, so if you want tag A to be interpreted before tag B, put A
  before B and the right thing will happen.
  
</p>
<p>
  Perl code embedded inside the WebMake file, using <a href="perl.html">&lt;{perl}&gt;</a> processing directives, will be evaluated there
  and then (unless the &lt;{perl}&gt; block is embedded in another block, such
  as a content item or <a href="out.html">&lt;out&gt;</a> file block).
  
</p>
<p>
  This means that you can define content items by hand, search for other content
  items using a <a href="contents.html">&lt;contents&gt;</a> tag, and then use a <a href="perl.html">&lt;{perl}&gt;</a> section to define a list of all content items
  which satisfy a particular set of criteria.
  
</p>
<p>
  This list can then be used in later <a href="perl.html">&lt;{perl}&gt;</a> blocks, content references, or <a href="for.html">&lt;for&gt;</a> tags.
  
</p>
 <a name="Processing_the_lt_out_gt_Tags"><h2>Processing the &lt;out&gt; Tags</h2></a><p>
  Once the file is fully parsed, the <a href="out.html">&lt;out&gt;</a> tags are
  processed, one by one.
  
</p>
<p>
  At this point, content references, <a href="set.html">&lt;{set}&gt;</a> tags, and
  <a href="perl.html">&lt;{perl}&gt;</a> processing directives will be interpreted,
  if they are found within content chunks. Finally, deferred content references
  and <a href="metadata.html">metadata</a> references are expanded.
  
</p>
<p>
  Eventually, no content references, <a href="set.html">&lt;{set}&gt;</a> tags, <a href="perl.html">&lt;{perl}&gt;</a> processing directives, <a href="metadata.html">metadata</a> references, or
  URL references are left in the file text. At this point, the file is written
  to disk under a temporary name, and the next output file is processed.
  
</p>
<p>
  Once all output files are processed, the entire set of files which have
  been modified are moved into place, replacing any previous versions.
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>The &lt;{set}&gt; Directive</h2><p>
  Small pieces of content can be set from within other content chunks or
  &lt;out&gt; sections using the &lt;set&gt; directive. The format is
  
</p>
<blockquote>
  <p>
    &lt;{set <em>name</em>="<em>value</em>"}&gt;
    
  </p>
</blockquote>
<p>
  This can be useful to set small chunks of text, by including a <a href="set.html">&lt;{set}&gt;</a> directive in the content item that uses them.
  
</p>
<p>
  For example, a common use of &lt;{set}&gt; is to define, ahead of
  time, what text should be inserted into a template:
  
</p>
<blockquote>
  <p>
    &lt;{set template_body="${foo.txt}"}&gt;
     ${bar_template}
    
  </p>
</blockquote>
 <a name="Note_Order_of_Content_Reference_Processing"><h3>Note: Order of Content Reference Processing</h3></a><p>
  The processing of content references starts at each <a href="out.html">&lt;out&gt;</a> URL in turn, and descends from the chunk of text
  defined for that file, replacing each <a href="content_refs.html">${content_ref}</a> and <a href="url_refs.html">$(url_ref)</a> one-by-one, in a depth-first manner.
  
</p>
<p>
  Finally, the tree-traversal starts again from the chunk of &lt;out&gt; text,
  searching for <a href="deferred_content_refs.html">$[deferred_content
  refs]</a>.
  
</p>
<p>
  Therefore if you wish to &lt;{set}&gt; a variable, let's say <strong>x</strong>, in a chunk
  of content that will not be loaded before <strong>x</strong> is accessed, you should use
  a <a href="deferred_content_refs.html">$[deferred content ref]</a> to
  access it.
  
</p>
 <a name="How_lt_set_gt_Relates_To_Meta_data"><h3>How &lt;{set}&gt; Relates To Meta-data</h3></a><p>
  The &lt;{set}&gt; directive was implemented before <a href="metadata.html">metadata</a> was, and initially
  provided a way to do similar things, such as substitute page titles, etc.
  
</p>
<p>
  Now, however, it's probably better to use <a href="wmmeta.html">&lt;wmmeta&gt; tags</a> to
  handle data that is associated with a content-item. Using &lt;wmmeta&gt; tags
  means your pages will be able to take advantage of new features, like index
  and site-map generation.
  
</p>
<p>
  The &lt;{set}&gt; directive is retained as a way of quickly setting content
  items from within other content, in case this feature proves useful for other
  purposes.
  
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;{perl}&gt; Directives</h2><p>
  Arbitrary perl code can be executed using this directive.
  
</p>
<p>
  It works like perl's <code>eval</code> command; the return value from the perl block is
  inserted into the file, so a perl code block like this:
  
</p>
<p>
  <pre>
	&lt;{perl
	  $_ = '';
	  for my $fruit (qw(apples oranges pears)) {
	    $_ .= " ".$fruit;
	  }
	  $_;
	}&gt;
</pre>
</p>
<p>
  will be replaced with the string " apples oranges pears". Note that the
  <code>$_</code> variable is declared as local when you enter the perl block,
  you don't have to do this yourself.
  
</p>
<p>
  If you don't like the eval style, you can use a more PHP/JSP/ASP-like
  construct using the <code>perlout</code> directive, which replaces the perl code text
  with anything that the perl code prints on the default output filehandle, like
  so:
  
</p>
<p>
  <pre>
	&lt;{perlout
	  for my $fruit (qw(apples oranges pears)) {
	    print " ", $fruit;
	  }
	}&gt;
</pre>
</p>
<p>
  Note that this is not STDOUT, it's a local filehandle called <code>$outhandle</code>.
  It <em>is</em> selected as the default output handle, however, so just <code>print</code>
  without a filehandle name will work.
  
</p>
<p>
  Also, it should be noted that <code>perl</code> is a little more efficient than
  <code>perlout</code>, so if you're going all-out for speed, you should use that.
  
</p>
<p>
  <a href="perl.html">&lt;{perl}&gt;</a> sections found at the top level of the
  WebMake file will be evaluated during the file-parsing pass, as they
  are found.
  
</p>
<p>
  <a href="perl.html">&lt;{perl}&gt;</a> sections embedded inside content chunks
  or other tagged blocks will be evaluated only once they are referenced.
  
</p>
<p>
  Perl code can access content variables and URLs using the <a href="PerlCodeLibrary.pm.html">library functions provided</a>.
  
</p>
<p>
  The library functions are available both as normal perl functions in the
  default <code>main</code> package, or, if you want to write thread-safe or mod_perl-safe
  perl code, as methods on the <code>$self</code> object. The <code>$self</code>
  object is available as a local variable in the perl code block.
  
</p>
<p>
  A good example of perl use inside a WebMake file can be found in the
  <code>news_site.wmk</code> file in the <em>examples</em> directory.
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>Globs and Regexps</h2><p>
  A number of WebMake parameters and perl APIs support pattern matching.
  This is performed using glob patterns and regular expressions.
  
</p>
 <a name="Glob_Patterns"><h1>Glob Patterns</h1></a><p>
  These are more-or-less traditional shell- or MS-DOS-like globs, as follows:
  
</p>
<p>
  <blockquote>
    <table>
      <tr>
        <td>
          <strong> * </strong>
        </td>
        <td>
          matches any number of characters <em>except</em> <strong>/</strong>
        </td>
      </tr>
      <tr>
        <td>
          <strong> ... </strong>
        </td>
        <td>
          matches any number of characters, <em>including</em> <strong>/</strong>
        </td>
      </tr>
      <tr>
        <td>
          <strong> ? </strong>
        </td>
        <td>
          matches one character
        </td>
      </tr>
    </table>
  </blockquote>
</p>
<p>
  Note that traditional globs do not include <strong>...</strong>; this is a WebMake
  extension (well, the concept's nicked from <a href="http://www.perforce.com/">Perforce</a> ;)
  
</p>
<p>
  This is the default mode of matching. Example globs are:
  <strong>*.html</strong>, <strong>.../*.txt</strong>.
  
</p>
 <a name="Regular_Expressions"><h1>Regular Expressions</h1></a><p>
  These are perl-style regular expressions. They are differentiated
  from glob patterns by prefixing them with <strong>RE:</strong>, for example:
  <strong><code>RE:^.*\.html$</code></strong>.
  
</p>
<p>
  An introduction to regular expressions is beyond the scope of this
  documentation. For more details, check your perl documentation, or search the
  web.
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>Sorting Lists of Content Items</h2><p>
  Frequently, you will need to get a list of content items in sorted order.
  WebMake itself does this for the <a href="sitemap.html">sitemap</a> tag, among others.
  
</p>
<p>
  Sorting is typically performed using a content item's metadata; some <a href="metadata.html">metadata</a>
  that are especially useful are:
  
</p>
<dl>
  <dt>
    <em>score</em>
  </dt>
  <dd>
    <p>
      A number representing the "priority" of a content
       item; specifically intended for use when sorting. Defaults to <strong>50</strong>
       if unset.
      
    </p>
  </dd>
  <dt>
    <em>title</em>
  </dt>
  <dd>
    <p>
      The title of a content item. Handy for alphabetic
       lists. Defaults to <strong>(Untitled)</strong> if not set.
      
    </p>
  </dd>
  <dt>
    <em>declared</em>
  </dt>
  <dd>
    <p>
      The item's declaration order. This is a number
       representing when the content item was first encountered in the
       WebMake file; earlier content items have a lower declaration order.
       You do not need to set this; WebMake will do so automatically.
      
    </p>
  </dd>
  <dt>
    <em>mtime</em>
  </dt>
  <dd>
    <p>
      The modification date, in UNIX time_t
       seconds-since-the-epoch format, of the file the content item was
       loaded from.
      
    </p>
  </dd>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      The name of the content item.
      
    </p>
  </dd>
</dl>
<p>
  WebMake provides a built-in mechanism to allow easy sorting of content items,
  called a <em><a href="sorting.html">sort spec</a></em> or <em><a href="sorting.html">sort string</a></em>.
  
</p>
<p>
  This is typically used either with the Perl code library's
  <a href="PerlCodeLibrary.pm.html#item__sortedobjs"><code>sort_content_objects()</code></a> call, or using a
  <code>sortorder</code> attribute as the <a href="sitemap.html">sitemap</a> tag does.
  
</p>
<p>
  A <a href="sorting.html">sort string</a> is a text string, containing a space-separated list of <a href="metadata.html">metadata</a>
  items. The first entry in the list is the main sorting criterion; the second
  entry is then used to break deadlocks if two entries match for the main
  criterion, etc.
  
</p>
<p>
  In addition, a <a href="metadata.html">metadata</a> item can be prefixed with a <code>!</code>, to reverse its
  order.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <strong>score title</strong>: sort by score, and if two content items have the same
  score, sort by title.
  
</p>
<p>
  <strong>declared</strong>: sort by the order in which they were declared in the WebMake
  file.
  
</p>
<p>
  <strong>score title !mtime</strong>: sort by score and title, and if more than one content
  item have the same score and title, sort them into oldest-first order.
  
</p>
<p>
  
</p>
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Variable References' section</h1><ul>
  <li>
    <p>
      <a href="content_refs.html">${content_refs} - References to Content Chunks</a> - references to content chunks
    </p>
  </li>
  <li>
    <p>
      <a href="url_refs.html">$(url_refs) - References to URLs</a> - references to URLs
    </p>
  </li>
  <li>
    <p>
      <a href="deferred_content_refs.html">$[deferred_content refs] - Deferred Content References</a> - deferred references to content chunks
    </p>
  </li>
</ul>
<hr />
 <h2>${content_refs} - References to Content Chunks</h2><p>
  Content chunks and variables can be referred to using this format. This is
  evaluated before any other variable reference is.
  
</p>
<blockquote>
  <p>
    <strong>${<em>name</em>}</strong>
  </p>
</blockquote>
<p>
  Content chunks can refer to other chunks, URLs, or use deferred references,
  up to 30 levels deep.
  
</p>
 <a name="Default_Values"><h3>Default Values</h3></a><p>
  If you wish to refer to a content item or variable, but are not sure if it
  exists, you can provide a default value by following the content name
  with a question mark and the default value.
  
</p>
<blockquote>
  <p>
    <strong>${<em>name</em>?<em>defaultvalue</em>}</strong>
  </p>
</blockquote>
 <a name="Parameterized_References"><h3>Parameterized References</h3></a><p>
  Content references can also be <em>parameterised</em> references; this means
  that they act like function calls, in a way, allowing you to pass
  in parameters. They look like this:
  
</p>
<blockquote>
  <p>
    <strong>${<em>name</em>: <em>parameter</em>="<em>value</em>" ...}</strong>
  </p>
</blockquote>
<p>
  The parameters are declared in the XML style.
  
</p>
<blockquote>
  <p>
    <strong>Note:</strong> the parameters' values must not contain further content
     references, due to a limitation in the way WebMake parses
     content refs. If you want to refer to a content item from
     within a template, pass in the <strong>name</strong> of the content item,
     and get the template to expand it; see the example below.
    
  </p>
</blockquote>
<p>
  For example, if you set up a template item like this:
  
</p>
<p>
  <!--etsafe-->
  <pre>
	&lt;template name="mytemplate"&gt;
		You passed in &#36;{name}, and its value is \"&#36;{&#36;{name}}\".
	&lt;/template&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  and a content item like this:
  
</p>
<p>
  <!--etsafe-->
  <pre>
	&lt;content name="foo"&gt;
		Hi, I'm foo!
	&lt;/content&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  Then a reference to:
  
</p>
<blockquote>
  <p>
    <strong>${mytemplate: name="foo"}</strong>
  </p>
</blockquote>
<p>
  will expand to:
  
</p>
<blockquote>
  <p>
    **You passed in foo, and its value is \"Hi, I'm foo!\".
    
  </p>
</blockquote>
<p>
  
</p>
</p>
<hr noshade />
 <h2>$(url_refs) - References to URLs</h2><p>
  URLs of defined &lt;out&gt; sections and &lt;media&gt; items can be inserted
  into the current content using this reference format.
  
</p>
<blockquote>
  <p>
    <strong>$(<em>name</em>)</strong>
  </p>
</blockquote>
<p>
  Note that all URL references are written relatively; so a file created in the
  <strong>foo/bar/baz</strong> subdirectory which contains a URL reference to
  <strong>blah/argh.html</strong> will be rewritten to refer to <strong>../../../blah/argh.html</strong>.
  
</p>
<p>
  Again, if you're not sure a URL exists, a default value can be supplied,
  using this format:
  
</p>
<blockquote>
  <p>
    <strong>$(<em>name</em>?<em>defaultvalue</em>)</strong>
  </p>
</blockquote>
<p>
  
</p>
</p>
<hr noshade />
 <h2>$[deferred_content refs] - Deferred Content References</h2><p>
  These are identical to <a href="content_refs.html">${content_refs}</a>,
  but are evaluated only after all other references.
  
</p>
<blockquote>
  <p>
    <strong>$[<em>name</em>]</strong>
  </p>
</blockquote>
<p>
  This means that a content variable can be set at the end of an <a href="out.html">&lt;out&gt;</a> section, but referred to at the start, for example. Handy for HTML page
  titles.
  
</p>
<p>
  In addition, this is the recommended way to access metadata set using the
  <a href="wmmeta.html">wmmeta</a> tag.
  
</p>
<p>
  Again, a default value can be supplied, using this format:
  
</p>
<blockquote>
  <p>
    <strong>$[<em>name</em>?<em>defaultvalue</em>]</strong>
  </p>
</blockquote>
<p>
  
</p>
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Meta Tags and Meta-Data' section</h1><ul>
  <li>
    <p>
      <a href="metadata.html">Metadata</a> - meta-data for content items, and how to use it
    </p>
  </li>
  <li>
    <p>
      <a href="wmmeta.html">The &lt;wmmeta&gt; Tag</a> - defining meta-data inside the tagged content object
    </p>
  </li>
  <li>
    <p>
      <a href="metadefault.html">The &lt;metadefault&gt; Tag</a> - Specify default metadata to attach to content
    </p>
  </li>
  <li>
    <p>
      <a href="metatable.html">The &lt;metatable&gt; Tag</a> - Attach metadata to another content item
    </p>
  </li>
  <li>
    <p>
      <a href="attrdefault.html">The &lt;attrdefault&gt; Tag</a> - Specify default attributes for content items
    </p>
  </li>
</ul>
<hr />
 <h2>Metadata</h2><p>
   <a name="What_Is_Metadata"><h3>What Is Metadata?</h3></a><p>
    Everyone is familiar with data, but the term <em>meta-data</em> is not so familiar.
    Here's a brief primer.
    
  </p>
  <p>
    To illustrate, I'll use an example familiar to most readers. Most computer
    operating systems nowadays have the concept of files in a filesystem. If you
    consider the files as <em>data</em>, then details such as file size, modification
    times, username of the owner etc. are <em><a href="metadata.html">metadata</a></em>, ie. data about the files.
    
  </p>
  <p>
    In WebMake, <a href="metadata.html">metadata</a> is used to refer to properties of textual content items.
    For example, a newspaper article may have a <em>title</em>, an <em>abstract</em> (ie. a
    brief summary), etc.
    
  </p>
  <p>
    This kind of data is very useful for building indices and catalogues, in the
    same way that Windows Explorer or the UNIX ls(1) command uses filesystem
    <a href="metadata.html">metadata</a> to display file listings. As a result, a good way to think of it is
    as "catalog data", as opposed to "narrative data", which is what a normal
    content item is. (thanks to Vaibhav Arya, vaibhav /at/ mymcomm.com, for that
    analogy.)
    
  </p>
  <p>
    To extend this metaphor, you should use <a href="metadata.html">metadata</a> for anything that would be
    used to describe your pages in a catalog. For example, given the page
    title, a quick abstract of the page, and a number to indicate its importance
    relative to other pages, one could easily create a list of pages
    automatically. In fact, this is how the indexes in the WebMake documentation
    are generated, and it's how sitemaps, breadcrumb trails and site trees are
    implemented.
    
  </p>
   <a name="How_to_Define_Metadata"><h3>How to Define Metadata</h3></a><p>
    WebMake can load <a href="metadata.html">metadata</a> from a number of sources:
    
  </p>
  <ul>
    <li>
      <p>
        <strong>Inferred from the content text itself</strong>: WebMake supports
         "magic" <a href="metadata.html">metadata</a>, which contains some inferred data about the
         content, such as its last modification date (which can be inferred
         from the filesystem storage of the content file itself). In
         addition, title <a href="metadata.html">metadata</a> can be inferred from several sources, such
         as the <code>&lt;title&gt;</code> tag in HTML, or <code>=head1</code> tags in POD
         text.
        
      </p>
    </li>
    <li>
      <p>
        <strong>Tags embedded within the content text</strong>: This is handled
         using the <a href="wmmeta.html">&lt;wmmeta&gt;</a> tag.
        
      </p>
    </li>
    <li>
      <p>
        <strong>Set as defaults before the content items are defined</strong>: the
         <a href="metadefault.html">&lt;metadefault&gt;</a> WebMake tag.
        
      </p>
    </li>
    <li>
      <p>
        <strong>Defined in bulk and "attached" to the content items</strong>: the
         <a href="metatable.html">&lt;metatable&gt;</a> tag.
        
      </p>
    </li>
  </ul>
  <a name="Referring_to_Metadata"><h3>Referring to Metadata</h3></a><p>
    Metadata is referred to using the <a href="deferred_content_refs.html">deferred content ref</a> format:
    
  </p>
  <blockquote>
    <p>
      $[<em>content</em>.<em>metaname</em>]
      
    </p>
  </blockquote>
  <p>
    Where <em>content</em> is the name of the content item, and <em>metaname</em> is the
    name of the metadatum. So, for example, <em>$[blurb.txt.title]</em>
    would return the <em>title</em> metadatum from the content item <em>blurb.txt</em>.
    
  </p>
  <p>
    Meta tag names are case-insensitive, for compatibility with HTML meta tags.
    
  </p>
  <p>
    Any content chunk can access <a href="metadata.html">metadata</a> from other content chunks within the
    same <a href="out.html">&lt;out&gt;</a> tag, using <strong>this</strong> as the <em>content</em> name, i.e.
    <em>$[this.title]</em> . This is handy, for example, in setting the
    page title in the main content chunk, and accessing it from the header chunk.
    
  </p>
  <p>
    If more than one content item sets the same item of <a href="metadata.html">metadata</a> inside the
    <a href="out.html">&lt;out&gt;</a> tag, the first one will take precedence.
    
  </p>
  <p>
    The example files "news_site.wmk" and "news_site_with_sections.wmk"
    demonstrate how meta tags can be used to generate a SlashDot or Wired
    News-style news site. The index pages in those sites are generated
    dynamically, using the <a href="metadata.html">metadata</a> to decide which pages to link to, their
    ordering, and the titles and abstracts to use.
    
  </p>
   <a name="How_Do_I_Use_Metadata_In_WebMake"><h3>How Do I Use Metadata In WebMake?</h3></a><p>
    WebMake provides extra support for <a href="metadata.html">metadata</a> in an efficient way. A
    <em>metadatum</em> is like a normal content item, except it is exposed to all other
    pages in the WebMake file. This data is accessible, both to other pages in
    the site (as <strong>$[<em>contentname</em>.<em>metaname</em>]</strong>), and to other
    content items within the same page (as
    <strong>$[this.<em>metaname</em>]</strong>).
    
  </p>
  <p>
    In addition, WebMake caches <a href="metadata.html">metadata</a> in the site cache file between runs, so
    that a subsequent partial site build will not require loading all the content
    text, just to read a page title.
    
  </p>
  <p>
    Note that content items representing <a href="metadata.html">metadata</a> cannot, themselves, have
    <a href="metadata.html">metadata</a>.
    
  </p>
   <a name="What_Metadata_Should_I_Use"><h3>What Metadata Should I Use?</h3></a><p>
    The items marked <em>(built-in)</em> are supported directly inside WebMake, and used
    internally for functionality like building site maps and indices. All the
    other suggested <a href="metadata.html">metadata</a> names here are just that, suggestions, which support
    commonly-required functionality.
    
  </p>
  <p>
    Also note that the names are case-insensitive, they're just capitalised here
    for presentation.
    
  </p>
  <dl>
    <dt>
      <em>Title</em>
    </dt>
    <dd>
      <p>
        the title of a content item. The default title for
         content items is inferred from the content text where possible,
         or <em>(Untitled)</em> if no title can be found. (built-in)
        
      </p>
    </dd>
    <dt>
      <em>Score</em>
    </dt>
    <dd>
      <p>
        a number representing the "priority" of a content
         item; used to affect how the item should be ranked in a list of
         stories. The default value is <em>50</em>. Items with the same score will
         be ranked alphabetically by title. (built-in)
        
      </p>
    </dd>
    <dt>
      <em>Abstract</em>
    </dt>
    <dd>
      <p>
        a short summary of a content item.
        
      </p>
    </dd>
    <dt>
      <em>Up</em>
    </dt>
    <dd>
      <p>
        used to map the site's content; this <a href="metadata.html">metadata</a> indicates the
         content item that is the parent of the current content item. This metadatum
         is used to generate dynamic sitemaps. (built-in)
        
      </p>
    </dd>
    <dt>
      <em>Section</em>
    </dt>
    <dd>
      <p>
        the section of a site under which a story should be
         filed.
        
      </p>
    </dd>
    <dt>
      <em>Author</em>
    </dt>
    <dd>
      <p>
        who wrote the item. 
        
      </p>
    </dd>
    <dt>
      <em>Approved</em>
    </dt>
    <dd>
      <p>
        has this item been approved by an editor; used to
         support workflow, so that content items need to be approved before
         they are displayed on the site. 
        
      </p>
    </dd>
    <dt>
      <em>Visible_Start</em>
    </dt>
    <dd>
      <p>
        the start of an item's "visibility window",
         ie. when it is listed on an index page. (TODO: define a recommended
         format for this, or replace with DC.Coverage.temporal)
        
      </p>
    </dd>
    <dt>
      <em>Visible_End</em>
    </dt>
    <dd>
      <p>
        the end of an item's "visibility window",
         ie. when it is listed on an index page.
        
      </p>
    </dd>
    <dt>
      <em>DC.Publisher</em>
    </dt>
    <dd>
      <p>
        a <a href="http://www.ietf.org/rfc/rfc2413.txt">Dublin Core</a> metadatum. The organisation or
         individual that publishes the entire site.
        
      </p>
    </dd>
  </dl>
  <p>
    The <a href="http://www.ietf.org/rfc/rfc2413.txt">Dublin Core</a> is a whole load of suggested <a href="metadata.html">metadata</a> names and formats,
    which can be used either to replace or supplement the optional <a href="metadata.html">metadata</a> named
    above. Regardless of whether you replace or supplement the <a href="metadata.html">metadata</a> above
    internally, it is definitely recommended to use the DC names for <a href="metadata.html">metadata</a>
    that's made visible in the output HTML through conventional HTML &lt;meta&gt;
    tags.
    
  </p>
   <a name="Built_In_Metadata"><h3>Built-In Metadata</h3></a><p>
    These are some built-in "magic" items of <a href="metadata.html">metadata</a> that do not need to be
    defined manually. Instead, they are automatically inferred by WebMake itself:
    
  </p>
  <dl>
    <dt>
      <em>declared</em>
    </dt>
    <dd>
      <p>
        the item's declaration order. This is a number
         representing when the content item was first encountered in the
         WebMake file; earlier content items have a lower declaration order.
         Useful for sorting.
        
      </p>
    </dd>
    <dt>
      <em>url</em>
    </dt>
    <dd>
      <p>
        the first &lt;out&gt; URL which contains that content
         item (you should order your &lt;out&gt; tags to ensure each stories'
         "primary" page is listed first, or set <em>ismainurl=false</em> on the
         "alternative" output pages, if you plan to use this). See also the
         <strong>get_url()</strong> method on the <a href="Content.pm.html">HTML::WebMake::Content</a> object.
        
      </p>
    </dd>
    <dt>
      <em>is_generated</em>
    </dt>
    <dd>
      <p>
        0 for items loaded from a &lt;content&gt; or
         &lt;contents&gt; tag, 1 for items created by Perl code using the
         <em>add_content()</em> function.
        
      </p>
    </dd>
    <dt>
      <em>mtime</em>
    </dt>
    <dd>
      <p>
        The modification date, in UNIX time_t
         seconds-since-the-epoch format, of the file the content item was
         loaded from. Handy for sorting.
        
      </p>
    </dd>
  </dl>
  <a name="Why_Use_Metadata"><h3>Why Use Metadata</h3></a><p>
    Support for <a href="metadata.html">metadata</a> is an important CMS feature.
    
  </p>
  <p>
    It is used by <a href="http://www.midgard-project.org/manual/contentmgmt.topic-trees.html">Midgard</a> and Microsoft's <a href="http://www.microsoft.com/technet/ecommerce/contmgt.asp">SiteServer</a>, and is available as
    <a href="http://zelotes.ent.iastate.edu/metadata/">user-contributed code</a> for <a href="http://manila.userland.com/">Manila</a>. It provides copious benefits
    for flexible index and <a href="sitemap.html">sitemap</a> generation, and, with the addition of an
    <em>Approved</em> tag, adds initial support for workflow.
    
  </p>
  <p>
    It allows the efficient generation of <a href="sitemap.html">site maps</a>, <a href="navlinks.html">back/forward
    navigation links</a>, and <a href="breadcrumbs.html">breadcrumb trails</a>, and
    enables index pages to be generated using Perl code easily and in a
    well-defined way.
    
  </p>
  <p>
    
  </p>
</p>
<hr noshade />
 <h2>The &lt;wmmeta&gt; Tag</h2><p>
  WebMake can load <a href="metadata.html">meta-data</a> directly from the content text,
  using the &lt;wmmeta&gt; tag.
  
</p>
<p>
  This tag is automatically stripped from the content when the content is
  referenced. It can be used either as an XML-style empty tag, similar to the
  HTML &lt;meta&gt; tag, if it ends in <em>/&gt;</em>:
  
</p>
<p>
  <pre>
  &lt;wmmeta name="Title" value="Story 1, blah blah" /&gt;
</pre>
</p>
<p>
  or with start and end tags, for longer bits of content:
  
</p>
<p>
  <pre>
  &lt;wmmeta name="Abstract"&gt;
    Story 1, just another story. Blah blah blah foo bar baz etc.
  &lt;/wmmeta&gt;
</pre>
</p>
<p>
  As you can see, each item of <a href="metadata.html">metadata</a> needs a <em>name</em> and a <em>value</em>. The
  latter format reads the <em>value</em> from the text between the start and end tags.
  
</p>
 <a name="Example"><h2>Example</h2></a><p>
  <pre><!--etsafe-->
  
  &lt;content name="foo"&gt;
    &lt; wmmeta name="Title" value="Foo" /&gt;
    &lt; wmmeta name="Abstract"&gt;
      Foo is all about fooing.
    &lt;/ wmmeta&gt;

    Foo foo foo foo bar. etc.
  &lt;/content&gt;
<!--/etsafe-->
  </pre>
</p>
<hr noshade />
 <h2>The &lt;metadefault&gt; Tag</h2><p>
  Metadata is usually embedded inside a content item using the &lt;wmmeta&gt;
  tag. However, this can be a chore for lots of content items, so to make
  things easier, you can specify default metadata settings, using the
  &lt;metadefault&gt; tag.
  
</p>
<p>
  Specify this tag before the content items in question, and those content items
  will all be tagged with the metadata you set.
  
</p>
<p>
  Like the <a href="attrdefault.html">attrdefault</a> tag, this tag can be used either in a
  <em>scoped</em> mode, or in a <em>command</em> mode.
  
</p>
 <a name="Scoped_Mode"><h3>Scoped Mode</h3></a><p>
  "Scoped" mode uses opening (<strong>&lt;metadefault&gt;</strong>) and closing
  (<strong>&lt;/metadefault&gt;</strong>) tags; the metadata is only set on content items
  between the two tags.
  
</p>
 <a name="Command_Mode"><h3>Command Mode</h3></a><p>
  Command mode uses standalone tags (<strong>&lt;metadefault ... /&gt;</strong>); the
  metadata are set until the end of the WebMake file, or until you change
  them with another &lt;metadefault&gt; tag.
  
</p>
 <a name="Attributes"><h2>Attributes</h2></a><dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      the metadatum's name, e.g. <em>Title</em>, <em>Section</em>,
       etc. This is required.
      
    </p>
  </dd>
  <dt>
    <em>value</em>
  </dt>
  <dd>
    <p>
      the metadatum's value. This is optional. If the
       value is not specified, the metadatum will be removed from the list of
       default metadata.
      
    </p>
  </dd>
</dl>
<a name="Example"><h2>Example</h2></a><p>
  Using the scoped style:
  
</p>
<p>
  <!--etsafe-->
  <pre>
  &lt;metadefault name="section" value="tags_and_attributes"&gt;

    &lt;content name="chunk_1.txt"&gt;...&lt;/content&gt;
    &lt;content name="chunk_2.txt"&gt;...&lt;/content&gt;
    &lt;content name="chunk_3.txt"&gt;...&lt;/content&gt;
    &lt;content name="chunk_4.txt"&gt;...&lt;/content&gt;

  &lt;/metadefault&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  Or, in the "command" style:
  
</p>
<p>
  <!--etsafe-->
  <pre>
  &lt;metadefault name="section" value="tags_and_attributes" /&gt;

  &lt;content name="chunk_1.txt"&gt;...&lt;/content&gt;
  &lt;content name="chunk_2.txt"&gt;...&lt;/content&gt;
  &lt;content name="chunk_3.txt"&gt;...&lt;/content&gt;
  &lt;content name="chunk_4.txt"&gt;...&lt;/content&gt;

  &lt;metadefault name="section" /&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;metatable&gt; Tag</h2><p>
  Metadata is usually embedded inside a content item using the &lt;wmmeta&gt;
  tag. However, sometimes you may want to tag a content item with metadata from
  outside, if the text of the content is not under your control; or you may want
  to tag metadata to an object that is not text-based, such as an image.
  
</p>
<p>
  The <a href="metatable.html">metatable</a> tag allows you to do this, and in bulk. You list a table of
  content names and the metadata you want to attach to each content item, in
  tab-, comma-, pipe-separated-value, or XML format.
  
</p>
<p>
  By default, the table is read from between the &lt;<a href="metatable.html">metatable</a>&gt; and
  &lt;/metatable&gt; tags. However, if you set the <em>src</em> attribute,
  the table will be read from the location specified, instead.
  
</p>
<p>
  Use the <em>format</em> attribute to specify whether the <a href="metatable.html">metatable</a> is in
  XML (<strong>xml</strong>) or Delimiter-Separated-Value (<strong>csv</strong>) format.
  
</p>
 <a name="Delimiter_Separated_Value_Format"><h1>Delimiter-Separated-Value Format</h1></a><p>
  Firstly, pick a delimiter character, such as <code>|</code>. Set the <em>delimiter</em>
  attribute to this character.
  
</p>
<p>
  Next, the first line of the <a href="metatable.html">metatable</a> lists the metadata you wish to set; it
  must start with the value <code>.</code>. This indicates to WebMake that it's
  defining the metadata to be set.
  
</p>
<p>
  Finally, list as many lines of metadata as you like; the first value on the
  line is the name of the content item you wish to attach the metadata to. From
  then on, the other values on the line are the values of the metadata.
  
</p>
<p>
  So, for example, consider this table, from the WebMake documentation:
  
</p>
<pre>&lt;<a href="metatable.html">metatable</a> delimiter="|"&gt;
 .|title|abstract
 Main.pm|HTML::WebMake::Main|module documentation
 PerlCodeLibrary.pm|HTML::WebMake::PerlCodeLibrary|module documentation
 Content.pm|HTML::WebMake::Content|module documentation
 EtText2HTML.pm|Text::EtText::EtText2HTML|module documentation
 HTML2EtText.pm|Text::EtText::HTML2EtText|module documentation
 webmake|webmake(1)|script documentation
 ettext2html|ettext2html(1)|script documentation
 ethtml2text|ethtml2text(1)|script documentation
 &lt;/metatable&gt;
</pre><p>
  This will set <strong>Main.pm.title</strong> to <strong>HTML::WebMake::Main</strong>,
  <strong>Main.pm.abstract</strong> to <strong>module documentation</strong>, etc.
  
</p>
 <a name="XML_Format"><h1>XML Format</h1></a><p>
  The XML block is surrounded with a &lt;metaset&gt; tag, and contains
  &lt;target&gt; blocks naming the content items the enclosed metadata items are
  associated with.
  
</p>
<p>
  Inside the &lt;target&gt; blocks, &lt;meta&gt; tags name each metadatum, and
  enclose the metadatum's value.
  
</p>
<p>
  <safe>
    <metaset>
      <target id="foo.txt">
        <meta name="title" />
        
         This is Foo.txt's title.
         
      </meta>
    </target>
  </metaset>
</safe>
</p>
 <a name="Using_lt_a_href_metatable_metatable_a_gt_To_Tag_Non_Content_Items"><h1>Using &lt;<a href="metatable.html">metatable</a>&gt; To Tag Non-Content Items</h1></a><p>
  Previously, WebMake required you to create phoney content items, in order to
  tag metadata onto images or other non-content items. This is no longer
  required. Just load the URLs of the items using a <a href="media.html">&lt;media&gt;</a>
  tag, and each one will have a "phoney" content item created with the same
  name automatically.
  
</p>
<p>
  Then use a <a href="metatable.html">metatable</a>, as above, to set the metadata you wish to use.
  
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The &lt;attrdefault&gt; Tag</h2><p>
  Attributes are usually specified inside a content item's <a href="content.html">&lt;content&gt;</a> or <a href="contents.html">&lt;contents&gt;</a> tags, or, for output files, inside
  the <a href="out.html">&lt;out&gt;</a> tag. However, this can be a chore if you have many
  items to set attributes on, so, to make things easier, you can specify default
  attributes using the &lt;attrdefault&gt; tag.
  
</p>
<p>
  Specify this tag before the content items or output files in question, and
  those items will all be tagged with the attributes you set.
  
</p>
<p>
  Like the <a href="metadefault.html">metadefault</a> tag, this tag can be used either in a
  <em>scoped</em> mode, or in a <em>command</em> mode.
  
</p>
 <a name="Scoped_Mode"><h3>Scoped Mode</h3></a><p>
  "Scoped" mode uses opening (<strong>&lt;attrdefault&gt;</strong>) and closing
  (<strong>&lt;/attrdefault&gt;</strong>) tags; the attributes are only set on content items
  or output files between the two tags.
  
</p>
 <a name="Command_Mode"><h3>Command Mode</h3></a><p>
  Command mode uses standalone tags (<strong>&lt;attrdefault ... /&gt;</strong>); the
  attributes are set until the end of the WebMake file, or until you change
  them with another &lt;attrdefault&gt; tag.
  
</p>
 <a name="Attributes"><h2>Attributes</h2></a><dl>
  <dt>
    <em>name</em>
  </dt>
  <dd>
    <p>
      the attribute's name, e.g. <em>up</em>, <em>map</em>,
       etc. This is required.
      
    </p>
  </dd>
  <dt>
    <em>value</em>
  </dt>
  <dd>
    <p>
      the attribute's value. This is optional. If the
       value is not specified, the attribute will be removed from the list of
       default attributes.
      
    </p>
  </dd>
</dl>
<a name="Example"><h2>Example</h2></a><p>
  Using the scoped style:
  
</p>
<p>
  <!--etsafe-->
  <pre>
  &lt;attrdefault name="format" value="text/html"&gt;
    &lt;content name="chunk_1.txt"&gt;...&lt;/content&gt;
    &lt;content name="chunk_2.txt"&gt;...&lt;/content&gt;
    &lt;content name="chunk_3.txt"&gt;...&lt;/content&gt;
    &lt;content name="chunk_4.txt"&gt;...&lt;/content&gt;
  &lt;/attrdefault&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  Or, in the "command" style:
  
</p>
<p>
  <!--etsafe-->
  <pre>
  &lt;attrdefault name="format" value="text/html" /&gt;

  &lt;content name="chunk_1.txt"&gt;...&lt;/content&gt;
  &lt;content name="chunk_2.txt"&gt;...&lt;/content&gt;
  &lt;content name="chunk_3.txt"&gt;...&lt;/content&gt;
  &lt;content name="chunk_4.txt"&gt;...&lt;/content&gt;

  &lt;attrdefault name="format" /&gt;
</pre><!--/etsafe-->
  
</p>
<p>
  
</p>
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Magic Variables' section</h1><ul>
  <li>
    <p>
      <a href="imgsize.html">The ${IMGSIZE} Magic Variable</a> - automatically add image size information to an &lt;img&gt; tag
    </p>
  </li>
  <li>
    <p>
      <a href="topslash.html">The $(TOP/) Magic Variable</a> - a relative path to the top-level of the site, for URLs
    </p>
  </li>
  <li>
    <p>
      <a href="webmake_vars.html">The ${WebMake.*} Magic Variables</a> - information about the environment WebMake is run in, such as the version of WebMake, the timestamp, the user who ran it, etc.
    </p>
  </li>
</ul>
<hr />
 <h2>The ${IMGSIZE} Magic Variable</h2><p>
  This reference provides an easy way to automatically add image size
  information to an &lt;img&gt; tag, for example:
  
</p>
<blockquote>
  <p>
    &lt;img src="foo.gif" ${IMGSIZE}&gt;
    
  </p>
</blockquote>
<p>
  Would become:
  
</p>
<blockquote>
  <p>
    &lt;img src="foo.gif" height=30 width=11&gt;
    
  </p>
</blockquote>
<p>
  It requires the <code>Image::Size</code> Perl module be installed, otherwise
  it does nothing.
  
</p>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The $(TOP/) Magic Variable</h2><p>
  This URL reference always evaluates to a relative path to the top-level of the
  site, for URLs.
  
</p>
<p>
  Note that setting the <strong>EtTextHrefsRelativeToTop</strong> option will cause all URLs
  in Text::EtText blocks, which don't start with a slash or a protocol
  specification, to be made relative to the top-level of the site.
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>The ${WebMake.*} Magic Variables</h2><p>
  WebMake defines several magic variables that expand to useful information about
  the current environment. These are as follows. Each one is illustrated with
  the value at the time this documentation was generated.
  
</p>
<dl>
  <dt>
    <strong>WebMake.Version</strong>
  </dt>
  <dd>
    <p>
      The version of WebMake
       that generated this site. (2.2)
      
    </p>
  </dd>
  <dt>
    <strong>WebMake.GeneratorString</strong>
  </dt>
  <dd>
    <p>
      A <em>generator string</em> for
       WebMake; this is in the form <strong>WebMake/v.vv</strong> where <em>v.vv</em>
       is the version number of WebMake. (WebMake/2.2)
      
    </p>
  </dd>
  <dt>
    <strong>WebMake.Who</strong>
  </dt>
  <dd>
    <p>
      The username of the person who generated
       the site. (jm)
      
    </p>
  </dd>
  <dt>
    <strong>WebMake.Time</strong>
  </dt>
  <dd>
    <p>
      The time the site was last generated.
       (Mon Oct 1 04:41:46 2001)
      
    </p>
  </dd>
  <dt>
    <strong>WebMake.OutFile</strong>
  </dt>
  <dd>
    <p>
      The filename used in the current &lt;out&gt; tag.
       (allinone.html)
      
    </p>
  </dd>
  <dt>
    <strong>WebMake.OutName</strong>
  </dt>
  <dd>
    <p>
      The name used in the current &lt;out&gt; tag.
       (allinone)
      
    </p>
  </dd>
  <dt>
    <strong>WebMake.PerlLib</strong>
  </dt>
  <dd>
    <p>
      The directory WebMake expects to find
       Perl code library files (ie. plugins) in. (/usr/lib/perl5/site_perl/5.005/HTML/WebMake/PerlLib)
      
    </p>
  </dd>
</dl>
<p>
  
</p>
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Format Converters' section</h1><ul>
  <li>
    <p>
      <a href="ettext.html">The Text::EtText Format Converter</a> - A simple plain-text format, easily converted to HTML (format: <em>text/et</em>)
    </p>
  </li>
  <li>
    <p>
      <a href="pod.html">The POD Format Converter</a> - Perl ''plain old documentation'' support (format: <em>text/pod</em>)
    </p>
  </li>
  <li>
    <p>
      <a href="cleaner.html">The HTML Cleaner</a> - the HTML cleaning filter
    </p>
  </li>
</ul>
<hr />
 <h2>The Text::EtText Format Converter</h2><p>
  This converter converts from Text::EtText, a simple plain-text format, to
  HTML. Like most simple text markup formats (POD, setext, etc.), EtText markup
  handles the usual things: insertion of <em>&lt;P&gt;</em> tags, header recognition,
  list recognition, and markup. However it adds a powerful link markup system.
  
</p>
<p>
  EtText is no longer included in WebMake; instead it must be downloaded
  separately from <a href="http://ettext.taint.org/">http://ettext.taint.org/</a>, where there is also a more detailed
  set of documentation.
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>The POD Format Converter</h2><p>
  This converter converts from POD to HTML, using Tom Christiansen's
  <strong>Pod::Html</strong> module.
  
</p>
<p>
  POD is a powerful, but simple, editable-text format for marking up
  manual-page-style documentation. See the "perlpod" manual page in your Perl
  documentation for more information on the POD format.
  
</p>
<p>
  Things to watch out for in WebMake's support for POD:
  
</p>
<ul>
  <li>
    <p>
      Anything before the &lt;BODY&gt; tag, or after the &lt;/BODY&gt;
       tag, in the generated output is stripped, so that the POD output can be
       embedded in HTML pages without requiring a page of its own.
      
    </p>
  </li>
  <li>
    <p>
      WebMake allows options to <strong>pod2html</strong> to be specified using
       the <em>podargs</em> attribute of the &lt;content&gt; tag; see below.
      
    </p>
  </li>
  <li>
    <p>
      If you are reading POD documentation embedded inside other files,
       you should probably use the "asis" attribute on the content items in
       question, otherwise all sorts of wierd things could happen as WebMake tries
       to interpret Perl variable references and so on! See the <a href="content.html">&lt;content&gt;</a> documentation for details on "asis".
      
    </p>
  </li>
</ul>
<a name="Specifying_Options_to_the_POD_Translator"><h1>Specifying Options to the POD Translator</h1></a><p>
  If you want to specify <strong>pod2html</strong> options to the converter, just
  put them in a string as a <em>podargs</em> attribute of the &lt;content&gt; tag,
  like so:
  
</p>
<blockquote>
  <p>
    &lt;content name="some_pod" podargs="--noindex"&gt;
     ...
     &lt;/content&gt;
    
  </p>
</blockquote>
<p>
  
</p>
</p>
<hr noshade />
 <h2>The HTML Cleaner</h2><p>
  The HTML cleaner is a powerful filter which can polish grotty, messy HTML into
  fully-standards-compliant glory. By default, all output of format
  <strong>text/html</strong> (the default format) will be passed through it.
  
</p>
<p>
  It is controlled using the <em>clean</em> parameter of the &lt;out&gt; tag.
  The features to be used should be listed in this parameter's value, separated
  by whitespace.
  
</p>
<p>
  Here are the features available:
  
</p>
<ul>
  <li>
    <p>
      <em>pack</em> - Compress the HTML, removing all white space that is not
       part of an attribute's value, or inside &lt;xmp&gt; or &lt;pre&gt; tags.
      
    </p>
  </li>
  <li>
    <p>
      <em>indent</em> - "Pretty-print" the HTML, indenting tags appropriately,
       except for text and markup inside &lt;xmp&gt; or &lt;pre&gt; tags.
      
    </p>
  </li>
  <li>
    <p>
      <em>nocomments</em> - Trim all comments.
      
    </p>
  </li>
  <li>
    <p>
      <em>addimgsizes</em> - Add image sizes to &lt;img&gt; tags if they do not
       already specify them.
      
    </p>
  </li>
  <li>
    <p>
      <em>cleanattrs</em> - Quote all attributes in opening tags, and lowercase
       all tag names.
      
    </p>
  </li>
  <li>
    <p>
      <em>addxmlslashes</em> - Add XML-style slashes to the end of empty-element
       tags, such as &lt;hr&gt;, &lt;img&gt; etc.
      
    </p>
  </li>
  <li>
    <p>
      <em>fixcolors</em> - Fix colors that do not start with a # character, so that
       they do.
      
    </p>
  </li>
</ul>
<p>
  The feature string <em>all</em> can be used to include all cleaning modes.
  
</p>
<p>
  The default mode is <code>pack addimgsizes cleanattrs addxmlslashes
  fixcolors indent</code>.
  
</p>
<p>
  
</p>
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Using WebMake.cgi' section</h1><ul>
  <li>
    <p>
      <a href="cgi.html">Using webmake.cgi</a> - How to use WebMake as a CGI script
    </p>
  </li>
  <li>
    <p>
      <a href="cgiinstall.html">Installing webmake.cgi</a> - How to install the WebMake CGI script in your web server
    </p>
  </li>
  <li>
    <p>
      <a href="cvshowto.html">Setting up CVS and ssh for webmake.cgi HOWTO</a> - A step-by-step guide to setting up version-control for your WebMake site
    </p>
  </li>
  <li>
    <p>
      <a href="cgistart.html">Using webmake.cgi</a> - How to navigate and use the ''edit-in-browser'' interface
    </p>
  </li>
</ul>
<hr />
 <h2>Using webmake.cgi</h2><p>
  WebMake now provides some simple "edit in browser" functionality, using
  <code><a href="cgistart.html">webmake.cgi</a></code>.
  
</p>
<p>
  <strong>Note:</strong> this is beta functionality, and may have security implications. Use
  with caution!
  
</p>
<p>
  Some features of note:
  
</p>
<ul>
  <li>
    <p>
      The default view is an overview of your site, allowing you to quickly find
       what you want to change.
      
    </p>
  </li>
  <li>
    <p>
      <a href="cgistart.html">webmake.cgi</a> includes a rudimentary file manager, allowing you to travel
       through the directories that make up your site, and create, delete, edit
       and upload files therein.
      
    </p>
  </li>
  <li>
    <p>
      Text and XML can be edited quickly, in a textbox, with built-in input
       areas for entering common <a href="metadata.html">metadata</a> items (such as titles).
      
    </p>
  </li>
  <li>
    <p>
      You can also use it to edit the items of content embedded in the WebMake
       file itself, or simply edit the WebMake XML file in a text box.
      
    </p>
  </li>
  <li>
    <p>
      With a single click of a link, the WebMake site can be built there and
       then.
      
    </p>
  </li>
</ul>
<p>
  Also, <a href="cgistart.html">webmake.cgi</a> supports CVS, which provides these benefits:
  
</p>
<ul>
  <li>
    <p>
      multiple copies of the same site can be replicated, and changes made on
       any of the sites will be automatically updated on all the others.
      
    </p>
  </li>
  <li>
    <p>
      changes made to the site will be kept under version control, so older
       versions of the site can be "rolled back" if necessary.
      
    </p>
  </li>
  <li>
    <p>
      a history of changes to the site is kept, allowing you to see exactly who
       did what to which.
      
    </p>
  </li>
</ul>
<p>
  
</p>
</p>
<hr noshade />
 <h2>Installing webmake.cgi</h2><p>
  To use this, copy or link <code><a href="cgistart.html">webmake.cgi</a></code> to your web server's <code>cgi-bin</code>
  directory, and set it up as a password-protected area. Here's how this is
  done with Apache:
  
</p>
<p>
  <pre><!--etsafe-->
  
  &lt;Location /cgi-bin/webmake.cgi&gt;
      &lt;Limit GET PUT POST&gt;
	Require valid-user
	AuthType Basic
	AuthName WebMake
	AuthUserFile /etc/httpd/conf/webmake.passwd
      &lt;/Limit&gt;
  &lt;/Location&gt;
<!--/etsafe-->
  </pre>
</p>
<p>
  Next, create the file <code>/etc/httpd/conf/webmake.passwd</code>. Example:
  
</p>
<p>
  <pre>
  htpasswd -c /etc/httpd/conf/webmake.passwd jm
  New password: <em>(type a password here)</em>
  Re-type new password: <em>(again)</em>
  Adding password for user jm
</pre>
</p>
<p>
  And edit the <code><a href="cgistart.html">webmake.cgi</a></code> script, changing the value for
  <strong>$FILE_BASE</strong>. Only files and sites below this directory will be
  editable.
  
</p>
<p>
  Note that <code><a href="cgistart.html">webmake.cgi</a></code> runs with the web server's username and password,
  so you may have to <code>chown</code> or <code>chmod</code> files for it to work.
  
</p>
 <a name="Supporting_Metadata_On_Media"><h1>Supporting Metadata On Media</h1></a><p>
  If you attach <a href="metadata.html">metadata</a> (e.g. titles) to images or other media items using
  <code><a href="cgistart.html">webmake.cgi</a></code>, it will write that <a href="metadata.html">metadata</a> to a file called <code><a href="metadata.html">metadata</a>.xml</code>
  in the top-level directory of the site. To pick this up, you will need to add
  the following &lt;<a href="metatable.html">metatable</a>&gt; directive to your site:
  
</p>
<p>
  <pre><!--etsafe-->
  
	&lt;metatable format=xml src=<a href="metadata.html">metadata</a>.xml /&gt;
<!--/etsafe-->
  </pre>
</p>
 <a name="Using_CVS_With_a_href_cgistart_webmake_cgi_a"><h1>Using CVS With <a href="cgistart.html">webmake.cgi</a></h1></a><p>
  Tt can be tricky setting up a CVS server. To make things a little easier, a
  step-by-step guide is provided in the <a href="cvshowto.html">Setting up CVS and
  ssh for webmake.cgi HOWTO</a>.
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>Setting up CVS and ssh for webmake.cgi HOWTO</h2><p>
  This document covers setting up Webmake with CVS and SSH. It's quite
  complicated, but the end result is worth it, providing version control and
  replication of your site.
  
</p>
 <a name="WHAT_YOU_WILL_NEED"><h1>WHAT YOU WILL NEED</h1></a><p>
  You will require a CVS server machine (one with a permanent internet connection
  if possible). This is where the CVS repository will live. The repository is
  the central store for all CVS-controlled documents.
  
</p>
<p>
  Then you will need at least one client machine (it could be the same computer,
  of course). Each client machine will have a copy of the website, checked out
  from the CVS repository. Initially, you'll use one of the clients to import
  the website into CVS.
  
</p>
<p>
  The client machines need to be able to connect to the server machine over the
  network; and if you're planning to use <a href="cgistart.html">webmake.cgi</a>, they need to be able to do
  this without passwords. To do this securely, you'll need to set up an SSH
  server and clients, and generate public/private key pairs. I'll cover some of
  this where possible, but you need to be familiar with SSH in general.
  
</p>
<p>
  (You don't strictly need to use SSH, but it allows multiple copies of the same
  site across the net, and allows changes made on any of the sites to be
  automatically replicated to all the others. This is obviously quite handy!
  However, if you don't want to use SSH, you'll still get the benefits of keeping
  the site under version control.)
  
</p>
<p>
  WARNING: as part of this procedure, you will need to allow CGI scripts on the
  client machine to run cvs commands on the server machine. If an attacker
  subverted the client machine, they may be able to use this to gain shell
  access to your account on the server machine. If this is a problem, it would
  probably be better not to set up <a href="cgistart.html">webmake.cgi</a>.
  
</p>
<p>
  When illustrating the commands needed to run this, I'll use my username and my
  hostnames. Wherever you see <strong>jm</strong>, replace with your username, wherever you
  see <strong>localhost</strong>, replace with your server's hostname, and wherever you see
  <strong>/cvsroot</strong>, replace with the path to your CVS repository on the server.
  
</p>
 <a name="CREATING_THE_REPOSITORY"><h1>CREATING THE REPOSITORY</h1></a><p>
  First of all, create the repository on the CVS server machine.
  
</p>
<p>
  <pre><!--etsafe-->
  
	mkdir /cvsroot;
	cvs -d /cvsroot init
<!--/etsafe-->
  </pre>
</p>
 <a name="SETTING_UP_SSH"><h1>SETTING UP SSH</h1></a><p>
  On a client machine, install the SSH client ("ssh"), and install the SSH server
  ("sshd") on the server machine. Set them up (as described in the ssh
  documentation).
  
</p>
<p>
  Next, if you haven't done this before, generate an ssh key pair for yourself
  on all machines:
  
</p>
<p>
  <pre><!--etsafe-->
  
	ssh-keygen -P "" -N ""
<!--/etsafe-->
  </pre>
</p>
<p>
  When it asks for the filenames to save the keys in, hit Enter to accept the
  defaults.
  
</p>
<p>
  Any machines you plan to run <a href="cgistart.html">webmake.cgi</a> on, you will also need to generate a
  key-pair for, so that the user the web server runs CGI scripts as will be able
  to communicate without passwords. Here's how (run these as root):
  
</p>
<p>
  <pre><!--etsafe-->
  
	mkdir ~apache/.ssh
	chmod 700 ~apache/.ssh
	chown apache ~apache/.ssh
	su apache -s/bin/sh -c 'ssh-keygen -P "" -N ""'
<!--/etsafe-->
  </pre>
</p>
<p>
  This will generate a public/private key-pair for the web server user. Note
  that the user the web server runs as on your UNIX may be different (<strong>httpd</strong>,
  <strong>www</strong>, or <strong>nobody</strong> are common usernames for it); in that case replace
  <strong>apache</strong> with the correct username.
  
</p>
<p>
  Don't worry; the keys you've set up will not compromise your server's
  security, as the SSH daemon will not allow anyone to log in as the web server
  user, since they have a no-login shell.
  
</p>
 <a name="SETTING_UP_NO_PASSWORD_LOGINS"><h1>SETTING UP NO-PASSWORD LOGINS</h1></a><p>
  This is optional for editing the site by hand using CVS, but if you're using
  <a href="cgistart.html">webmake.cgi</a>, it will require that this works.
  
</p>
<p>
  Here's how to set it up for <a href="cgistart.html">webmake.cgi</a>. Get the public key you just
  generated for the web user (run this as root):
  
</p>
<p>
  <pre><!--etsafe-->
  
  	cat ~apache/.ssh/identity.pub
<!--/etsafe-->
  </pre>
</p>
<p>
  you should get a long stream of gibberish starting with "1024" and ending
  with a hostname; that's the public key. Here's mine:
  
</p>
<p>
  <pre><!--etsafe-->
  
	1024 35
	15059408357788156311432762154619731093579709369085525651528959
	33782159340399119075502495847161401527101834823731504521848289
	07097066749035812105735673062224184578113153987480874569311840
	34611043915547598874334739513173936291615348136113929611666395
	3155785517017739076839134463214021324783262900267823081443889
	<a href="mailto:apache@mmmkay">apache@mmmkay</a>
<!--/etsafe-->
  </pre>
</p>
<p>
  On the server, create a file called <code>authorized_keys</code> in your <code>~/.ssh</code>
  directory:
  
</p>
<p>
  <pre><!--etsafe-->
  
	vi ~/.ssh/authorized_keys
<!--/etsafe-->
  </pre>
</p>
<p>
  and add this line to to it:
  
</p>
<p>
  <pre><!--etsafe-->
  
  	command="cvs server",no-port-forwarding,no-pty <em>...yourpublickey...</em>
<!--/etsafe-->
  </pre>
</p>
<p>
  This will allow CGI scripts on the client machine to access cvs on the server
  machine. Add similar lines for any other machines which need access to the
  CVS repository.
  
</p>
<p>
  Make sure it's read-write only by you, and unreadable to anyone
  else:
  
</p>
<p>
  <pre><!--etsafe-->
  
	chmod 0600 ~/.ssh/authorized_keys
<!--/etsafe-->
  </pre>
</p>
<p>
  Setting up no-password logins for manual editing is similar -- but instead of
  reading the public key from <code>~apache/identity.pub</code>, read it from
  <code>~/.ssh/identity.pub</code>, and leave out the <em>command="command"</em> part when
  adding it to <code>~/.ssh/authorized_keys</code> on the server-side.
  
</p>
<p>
  Next, try it out. This is required to initialise the client account with a
  host key for the server, and if you omit this step, the CGI script will not be
  able to update or check in code.
  
</p>
<p>
  <pre><!--etsafe-->
  
	echo test | su apache -s/bin/sh -c 'ssh <a href="mailto:jm@localhost">jm@localhost</a> cvs server'
<!--/etsafe-->
  </pre>
</p>
<p>
  It will ask you if you wish to accept the host key for server <strong>localhost</strong>.
  Type "yes" and hit Enter. If all goes well, you should see:
  
</p>
<p>
  <pre><!--etsafe-->
  
error  unrecognized request `test'
<!--/etsafe-->
  </pre>
</p>
<p>
  Important: you should <strong>not</strong> be prompted for a password. If you are prompted
  for one, check that the correct key has been entered in the
  <strong>authorized_keys</strong> file.
  
</p>
 <a name="IMPORTING_THE_SITE_INTO_CVS"><h1>IMPORTING THE SITE INTO CVS</h1></a><p>
  On a client machine, do this:
  
</p>
<p>
  <pre><!--etsafe-->
  
	export CVS_RSH=ssh
<!--/etsafe-->
  </pre>
</p>
<p>
  If possible, add this to your startup scripts (.bashrc or .cshrc), so
  you can't forget to set it. All further CVS commands in this document
  assume this environment variable is set.
  
</p>
<p>
  Create a WebMake XML configuration file for the site, if one is not already
  present. <a href="cgistart.html">webmake.cgi</a> will <em>require</em> that a site has a .wmk file.
  
</p>
<p>
  Now, run the "webmake_cvs_import" script. This script is a wrapper around
  the "cvs import" command which ensures that binary files (such as images
  etc.) are imported into CVS correctly.
  
</p>
<p>
  You need to provide a name for the CVS module. I'm using <strong>jmason.org</strong> in
  this example. You should pick a name that makes sense; I typically use the
  host name of the site I'm importing.
  
</p>
<p>
  <pre><!--etsafe-->
  
	webmake_cvs_import <a href="mailto:jm@localhost">jm@localhost</a>:/cvsroot jmason.org
<!--/etsafe-->
  </pre>
</p>
<p>
  Assuming this works, move on to <strong>CHECKING OUT THE SITE</strong>, below. (Keep a
  copy of the original site tree around just in case!)
  
</p>
 <a name="CHECKING_OUT_THE_SITE"><h1>CHECKING OUT THE SITE</h1></a><p>
  On the clients, create a directory for <a href="cgistart.html">webmake.cgi</a> to work in, in the web
  server's HTML tree, then check out the CVS tree:
  
</p>
<p>
  <pre><!--etsafe-->
  
	mkdir /var/www/html/jmason.org
	cd /var/www/html/jmason.org
	cvs -d :ext:<a href="mailto:jm@localhost">jm@localhost</a>:/cvsroot checkout jmason.org
<!--/etsafe-->
  </pre>
</p>
<p>
  <em>Note:</em> cvs checkout has a few idiosyncrasies; notably, the directory you're
  checking out must not exist in your filesystem, otherwise it will not populate
  it with the CVS data files it requires to do check-ins and updates later.
  
</p>
<p>
  Also, this directory must have the same name it has in the CVS repository
  (<strong>jmason.org</strong> in the example above). We don't want that, so move them
  nearer:
  
</p>
<p>
  <pre><!--etsafe-->
  
	mv jmason.org/* . ; rmdir jmason.org
<!--/etsafe-->
  </pre>
</p>
<p>
  then, as root,
  
</p>
<p>
  <pre><!--etsafe-->
  
	chown -R apache /var/www/html/jmason.org
<!--/etsafe-->
  </pre>
</p>
<p>
  so that <a href="cgistart.html">webmake.cgi</a> can read and write the files. (You could also chgrp them
  to <strong>www</strong> or whatever the web server user uses as its gid, and <strong>chmod -R
  g+w</strong> them.)
  
</p>
<p>
  Next, copy the "<a href="cgistart.html">webmake.cgi</a>" script to your web server's cgi-bin directory:
  
</p>
<p>
  <pre><!--etsafe-->
  
	cp webmake.cgi /cgi-bin/editsite.cgi
<!--/etsafe-->
  </pre>
</p>
<p>
  and edit the top of the script. You need to set these variables:
  
</p>
<p>
  <pre><!--etsafe-->
  
	&#36;FILE_BASE = '/var/www/html/jmason.org';
<!--/etsafe-->
  </pre>
</p>
<p>
  Note that if you've adopted the same convention as I use for the module name,
  you can use <strong>_<!-- -->
  _HOST_<!-- -->
  _</strong> as a shortcut in this line to mean the
  hostname of the site being edited. This is handy, as it allows you to use the
  same CGI script to edit multiple sites, in different virtual servers.
  
</p>
<p>
  Load up <strong><a href="http://localhost/cgi-bin/editsite.cgi">http://localhost/cgi-bin/editsite.cgi</a></strong> in a web browser, and it
  should have worked; you should see a list of "sites" (ie. .wmk files) to
  choose from.
  
</p>
<p>
  Try clicking on a site, scroll down to the bottom of the page, and click on
  the "[Update From CVS]" link. You should see a page of cvs
  messages, indicating that the site has been updated from the latest CVS
  checked-in version.
  
</p>
<p>
  If this works without errors, you're now set up. Set up as many more clients
  as you like!
  
</p>
<p>
  More info on CVS can be found <a href="http://www.cvshome.org/">here</a>.
  
</p>
<p>
  
</p>
<hr noshade />
 <h2>Using webmake.cgi</h2><p>
  First of all, after typing the <code><a href="cgistart.html">webmake.cgi</a></code> URL, you'll see a login dialog:
  
</p>
<div align="center">
   <img src="shots/login.png" width="323" height="228" />
</div>
<p>
  Type your username and password, and (assuming they're right) you'll see
  the <em>Choose Site</em> page. Choose the site (ie. the .wmk file) you wish
  to edit and click on its <strong>Edit</strong> link.
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/choose_site.png" width="411" height="189" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>
  The site you've chosen will appear in the <em>Edit Site</em> page:
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/edit_site.png" width="469" height="431" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>
  If you've set up CVS, it's probably good manners to ensure you do a <em>cvs
  update</em> immediately before changing anything. If you click on the <strong>Update
  From CVS</strong> link, you'll see the <em>CVS Update</em> page:
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/cvs_update.png" width="473" height="423" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>
  Once this is done, click on the <strong>return to WebMake file</strong> link to return to
  the <em>Edit Site</em> page.
  
</p>
 <a name="Editing_Content_Items"><h1>Editing Content Items</h1></a><p>
  If you have any items that contain text, such as &lt;content&gt; items, an
  <strong>Edit</strong> button will appear beside them. If you click this, you can edit the
  text of that item, and any embedded <a href="metadata.html">metadata</a>, in a textbox like so:
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/edit_item_page.png" width="474" height="376" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>
  This allows you to edit the text of the item, and even upload new text from
  your local disk, if you so wish. Hit the <strong>Save</strong> button to save the changes,
  or just hit your browser's <strong>Back</strong> button to avoid saving.
  
</p>
<p>
  The <em>Edit Site</em> page doesn't currently allow you to create new tags
  in the WebMake file, or change parameters to WebMake tags. To do this,
  use the <strong>Edit This File As Text</strong> link, which will present you with the
  entire Webmake XML file in the <em>Edit Page</em>:
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/edit_page.png" width="470" height="541" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
 <a name="Editing_Directories"><h1>Editing Directories</h1></a><p>
  WebMake tags that load content from directories, such as the &lt;contents&gt;
  tag, appear with a link beside them reading <strong>Browse Source Dir</strong>. If you
  click this, you'll be presented with the <em>Edit Directory</em> file browser
  window:
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/edit_dir.png" width="376" height="417" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>
  This allows you to navigate about the directory tree (although you cannot
  go above the directory you've named as <strong>$FILE_BASE</strong> in the
  <code><a href="cgistart.html">webmake.cgi</a></code> script), and perform some other operations, such as
  editing files in the <em>Edit Page</em>, create new files, and delete files:
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/delete_file.png" width="296" height="227" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
 <a name="Building_The_Site"><h1>Building The Site</h1></a><p>
  If you click the <strong>Build Site</strong> or <strong>Build Fully</strong> links on any of the
  pages, WebMake will build the site and present you with what was built
  (and what went wrong, if anything did!):
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/built_site.png" width="427" height="416" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
 <a name="Committing_Your_Changes_To_CVS"><h1>Committing Your Changes To CVS</h1></a><p>
  Once you're satisfied with the changes, hit the <strong>Commit Changes To CVS</strong>
  link. This will, firstly, ask you for a message describing your changes:
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/cvs_commit_msg.png" width="394" height="321" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>
  And, once you've provided that, will send your changes back to the
  CVS server.
  
</p>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td bgcolor="#333333">
      <table border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td bgcolor="#ffffff">
            <table border="0" cellpadding="2" cellspacing="2">
              <tr>
                <td>
                   <img src="shots/cvs_commit.png" width="471" height="432" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>
  Note that WebMake tracks any files you've added or deleted using hidden CGI
  variables, so once you've done a commit, you're given a choice between
  clearing out this list (if the commit was successful), or keeping them (if it
  failed in some way).
  
</p>
<p>
  
</p>
<hr noshade />
<hr size="4" />
<h1>Contents for the 'Module Documentation' section</h1><ul>
  <li>
    <p>
      <a href="Content.pm.html">HTML::WebMake::Content</a> - module documentation
    </p>
  </li>
  <li>
    <p>
      <a href="Main.pm.html">HTML::WebMake::Main</a> - module documentation
    </p>
  </li>
  <li>
    <p>
      <a href="PerlCodeLibrary.pm.html">HTML::WebMake::PerlCodeLibrary</a> - module documentation
    </p>
  </li>
</ul>
<hr />
 <h2>HTML::WebMake::Content</h2><!-- INDEX BEGIN -->
<ul>
  <li>
    <a href="#NAME">NAME</a><li>
      <a href="#SYNOPSIS">SYNOPSIS</a><li>
        <a href="#DESCRIPTION">DESCRIPTION</a><li>
          <a href="#METHODS">METHODS</a>
        </ul>
<!-- INDEX END -->
                <hr />
         <h1><a name="NAME">NAME</a></h1><p>
          
          Content - a content item.
          <hr />
           <h1><a name="SYNOPSIS">SYNOPSIS</a></h1><p>
            <pre>  &lt;{perl
</pre><p>
              <pre>    $cont = get_content_object (&quot;foo.txt&quot;);
    [... etc.]
</pre><p>
                <pre>  }&gt;
</pre><hr />
                 <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                  
                  This object allows manipulation of WebMake content items directly.
                  <hr />
                   <h1><a name="METHODS">METHODS</a></h1><dl>
                    <dt>
                      <strong><a name="item__text">$text = $cont-&gt;get_name();</a></strong>
                    </dt>
                    <dd>
                      <p>
                        
                        Return the content item's name.
                        
                      </dd>
                      <dt>
                        <strong>$text = $cont-&gt;as_string();</strong>
                      </dt>
                      <dd>
                        <p>
                          
                          A textual description of the object for debugging purposes; currently it's
                          name.
                          
                        </dd>
                        <dt>
                          <strong><a name="item__fname">$fname = $cont-&gt;get_filename();</a></strong>
                        </dt>
                        <dd>
                          <p>
                            
                            Get the filename or datasource location that this content was loaded from.
                            Datasource locations look like this:
                            <code>proto</code>:<code>protocol-specific-location-data</code>, e.g. <code>file:blah/foo.txt</code> or
                            <code>http://webmake.taint.org/index.html</code>.
                            
                          </dd>
                          <dt>
                            <strong><a name="item__filenames">@filenames = $cont-&gt;get_deps();</a></strong>
                          </dt>
                          <dd>
                            <p>
                              
                              Return an array of filenames and locations that this content depends on,
                              i.e. the filenames or locations that it contains variable references to.
                              
                            </dd>
                            <dt>
                              <strong><a name="item__flag">$flag = $cont-&gt;is_generated_content();</a></strong>
                            </dt>
                            <dd>
                              <p>
                                
                                Whether or not a content item was generated from Perl code, or is metadata.
                                Generated content items cannot themselves hold metadata.
                                
                              </dd>
                              <dt>
                                <strong><a name="item__val">$val = $cont-&gt;expand()</a></strong>
                              </dt>
                              <dd>
                                <p>
                                  
                                  Expand a content item, as if in a curly-bracket content reference. If the
                                  content item has not been expanded before, the current output file will be
                                  noted as the content item's ''main'' URL.
                                  
                                </dd>
                                <dt>
                                  <strong>$val = $cont-&gt;expand_no_ref()</strong>
                                </dt>
                                <dd>
                                  <p>
                                    
                                    Expand a content item, as if in a curly-bracket content reference. The
                                    current output file will not be used as the content item's ''main'' URL.
                                    
                                  </dd>
                                  <dt>
                                    <strong>$val = $cont-&gt;get_metadata($metaname);</strong>
                                  </dt>
                                  <dd>
                                    <p>
                                      
                                      Get an item of this object's metadata, e.g.
                                      <p>
                                        <pre>        $score = $cont-&gt;get_metadata(&quot;score&quot;);
</pre><p>
                                          
                                          The metadatum is converted to its native type, e.g. <code>score</code> is return as an integer, <code>title</code> as a string, etc. If the metadatum is not provided, the default value for
                                          that item, defined in HTML::WebMake::Metadata, is used.
                                          
                                        </dd>
                                        <dt>
                                          <strong><a name="item__score">$score = $cont-&gt;get_score();</a></strong>
                                        </dt>
                                        <dd>
                                          <p>
                                            
                                            Return a content item's score.
                                            
                                          </dd>
                                          <dt>
                                            <strong><a name="item__title">$title = $cont-&gt;get_title();</a></strong>
                                          </dt>
                                          <dd>
                                            <p>
                                              
                                              Return a content item's title.
                                              
                                            </dd>
                                            <dt>
                                              <strong><a name="item__modtime">$modtime = $cont-&gt;get_modtime();</a></strong>
                                            </dt>
                                            <dd>
                                              <p>
                                                
                                                Return a content item's modification date, in UNIX time_t format, ie.
                                                seconds since Jan 1 1970.
                                                
                                              </dd>
                                              <dt>
                                                <strong><a name="item__order">$order = $cont-&gt;get_declared();</a></strong>
                                              </dt>
                                              <dd>
                                                <p>
                                                  
                                                  Returns the content item's declaration order. This is a number representing
                                                  when the content item was first encountered in the WebMake file; earlier
                                                  content items have a lower declaration order. Useful for sorting.
                                                  
                                                </dd>
                                                <dt>
                                                  <strong><a name="item__kidobjs">@kidobjs = $cont-&gt;get_kids ($sortstring);</a></strong>
                                                </dt>
                                                <dd>
                                                  <p>
                                                    
                                                    Get the child content items for this item. The ''child'' content items are
                                                    items that use this content as their <code>up</code> metadatum.
                                                    <p>
                                                      
                                                      Returns a list of content objects in unsorted order.
                                                      
                                                    </dd>
                                                    <dt>
                                                      <strong>@kidobjs = $cont-&gt;get_sorted_kids ($sortstring);</strong>
                                                    </dt>
                                                    <dd>
                                                      <p>
                                                        
                                                        Get the child content items for this item. The ''child'' content items are
                                                        items that use this content as their <code>up</code> metadatum.
                                                        <p>
                                                          
                                                          Returns a list of content objects sorted by the provided sort string.
                                                          
                                                        </dd>
                                                        <dt>
                                                          <strong>$text = $cont-&gt;get_url();</strong>
                                                        </dt>
                                                        <dd>
                                                          <p>
                                                            
                                                            Get a content item's URL. The URL is defined as the first page listed in
                                                            the WebMake file's out tags which refers to that item of content.
                                                            <p>
                                                              
                                                              Note that, in some cases, the content item may not have been referred to
                                                              yet by the time it's <code>get_url()</code> method is called. In this case,
                                                              WebMake will insert a symbolic tag, hold the file in memory, and defer
                                                              writing the file in question until all other output files have been
                                                              processed and the URL has been found.
                                                              
                                                            </dd>
                                                          </dl>
                                                          <hr noshade />
                                                           <h2>HTML::WebMake::Main</h2><!-- INDEX BEGIN -->
                                                          <ul>
                                                            <li>
                                                              <a href="#NAME">NAME</a><li>
                                                                <a href="#SYNOPSIS">SYNOPSIS</a><li>
                                                                  <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                    <a href="#METHODS">METHODS</a><li>
                                                                      <a href="#MORE_DOCUMENTATION">MORE DOCUMENTATION</a><li>
                                                                        <a href="#SEE_ALSO">SEE ALSO</a><li>
                                                                          <a href="#AUTHOR">AUTHOR</a><li>
                                                                            <a href="#COPYRIGHT">COPYRIGHT</a><li>
                                                                              <a href="#AVAILABILITY">AVAILABILITY</a>
                                                                            </ul>
<!-- INDEX END -->
                                                                                                                                                        <hr />
                                                                             <h1><a name="NAME">NAME</a></h1><p>
                                                                              
                                                                              HTML::WebMake - a simple web site management system, allowing an entire
                                                                              site to be created from a set of text and markup files and one WebMake
                                                                              file.
                                                                              <hr />
                                                                               <h1><a name="SYNOPSIS">SYNOPSIS</a></h1><p>
                                                                                <pre>  my $f = new HTML::WebMake::Main ();
  $f-&gt;readfile ($filename);
  $f-&gt;make();
  my $failures = $f-&gt;finish();
  exit $failures;
</pre><hr />
                                                                                 <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                  
                                                                                  WebMake is a simple web site management system, allowing an entire site to
                                                                                  be created from a set of text and markup files and one WebMake file.
                                                                                  <p>
                                                                                    
                                                                                    It requires no dynamic scripting capabilities on the server; WebMake sites
                                                                                    can be deployed to a plain old FTP site without any problems.
                                                                                    <p>
                                                                                      
                                                                                      It allows the separation of responsibilities between the content editors,
                                                                                      the HTML page designers, and the site architect; only the site architect
                                                                                      needs to edit the WebMake file itself, or know perl or WebMake code.
                                                                                      <p>
                                                                                        
                                                                                        A multi-level website can be generated entirely from 1 or more WebMake
                                                                                        files containing content, links to content files, perl code (if needed),
                                                                                        and output instructions. Since the file-to-page mapping no longer applies,
                                                                                        and since elements of pages can be loaded from different files, this means
                                                                                        that standard file access permissions can be used to restrict editing by
                                                                                        role.
                                                                                        <p>
                                                                                          
                                                                                          Since WebMake is written in perl, it is not limited to command-line
                                                                                          invocation; using the <code>HTML::WebMake::Main</code> module directly allows WebMake to be run from other Perl scripts, or even
                                                                                          mod_perl (WebMake uses <code>use strict</code> throughout, and temporary globals are used only where strictly necessary).
                                                                                          <hr />
                                                                                           <h1><a name="METHODS">METHODS</a></h1><dl>
                                                                                            <dt>
                                                                                              <strong><a name="item__f">$f = new HTML::WebMake::Main</a></strong>
                                                                                            </dt>
                                                                                            <dd>
                                                                                              <p>
                                                                                                
                                                                                                Constructs a new <code>HTML::WebMake::Main</code> object. You may pass the following attribute-value pairs to the
                                                                                                constructor.
                                                                                                <dl>
                                                                                                  
                                                                                                </dd>
                                                                                                <dt>
                                                                                                  <strong><a name="item_force_output">force_output</a></strong>
                                                                                                </dt>
                                                                                                <dd>
                                                                                                  <p>
                                                                                                    
                                                                                                    Force output. Normally if a file is already up to date, it is not modified.
                                                                                                    This will force the file to be re-made.
                                                                                                    
                                                                                                  </dd>
                                                                                                  <dt>
                                                                                                    <strong><a name="item_force_cache_rebuild">force_cache_rebuild</a></strong>
                                                                                                  </dt>
                                                                                                  <dd>
                                                                                                    <p>
                                                                                                      
                                                                                                      Force the cached metadata and dependency data for the site to be rebuilt.
                                                                                                      Normally this is used to speed up partial rebuilds of the site. This option
                                                                                                      implies <a href="#item_force_output">force_output</a>.
                                                                                                      
                                                                                                    </dd>
                                                                                                    <dt>
                                                                                                      <strong><a name="item_risky_fast_rebuild">risky_fast_rebuild</a></strong>
                                                                                                    </dt>
                                                                                                    <dd>
                                                                                                      <p>
                                                                                                        
                                                                                                        Run more quickly, but take more risks. Normally, dynamic content, such as
                                                                                                        Perl sections, sitemaps, or navigation links, are always considered to be
                                                                                                        in need of rebuilding, as mapping their dependencies is often very
                                                                                                        difficult or impossible. This switch forces them to be ignored for
                                                                                                        dependency-tracking purposes, and so an output file that depends on them
                                                                                                        will not be rebuilt unless a normal content item on that page changes.
                                                                                                        
                                                                                                      </dd>
                                                                                                      <dt>
                                                                                                        <strong><a name="item_base_href">base_href</a></strong>
                                                                                                      </dt>
                                                                                                      <dd>
                                                                                                        <p>
                                                                                                          
                                                                                                          Rewrite links to be absolute URLs based at this URL. By default, links are
                                                                                                          specified as relative wherever possible.
                                                                                                          
                                                                                                        </dd>
                                                                                                        <dt>
                                                                                                          <strong><a name="item_base_dir">base_dir</a></strong>
                                                                                                        </dt>
                                                                                                        <dd>
                                                                                                          <p>
                                                                                                            
                                                                                                            Generate output, and look for support files (images etc.), relative to this
                                                                                                            directory.
                                                                                                            
                                                                                                          </dd>
                                                                                                          <dt>
                                                                                                            <strong><a name="item_paranoid">paranoid</a></strong>
                                                                                                          </dt>
                                                                                                          <dd>
                                                                                                            <p>
                                                                                                              
                                                                                                              Paranoid mode; do not allow perl code evaluation or accesses to directories
                                                                                                              above the WebMake file.
                                                                                                              
                                                                                                            </dd>
                                                                                                            <dt>
                                                                                                              <strong><a name="item_debug">debug</a></strong>
                                                                                                            </dt>
                                                                                                            <dd>
                                                                                                              <p>
                                                                                                                
                                                                                                                Debug mode; more output.
                                                                                                                
                                                                                                              </dd>
                                                                                                            </dl>
                                                                                                          </dd>
                                                                                                          <dt>
                                                                                                            <strong><a name="item__f_set_option">$f-&gt;set_option ($optname, $optval);</a></strong>
                                                                                                          </dt>
                                                                                                          <dd>
                                                                                                            <p>
                                                                                                              
                                                                                                              Set a WebMake option. Currently supported options are:
                                                                                                              <dl>
                                                                                                                
                                                                                                              </dd>
                                                                                                              <dt>
                                                                                                                <strong><a name="item__f_readfile">$f-&gt;readfile ($filename)</a></strong>
                                                                                                              </dt>
                                                                                                              <dd>
                                                                                                                <p>
                                                                                                                  
                                                                                                                  Read and parse the given WebMake file.
                                                                                                                  
                                                                                                                </dd>
                                                                                                                <dt>
                                                                                                                  <strong><a name="item__f_readstring">$f-&gt;readstring ($string)</a></strong>
                                                                                                                </dt>
                                                                                                                <dd>
                                                                                                                  <p>
                                                                                                                    
                                                                                                                    Read and parse the given WebMake configuration (as a string).
                                                                                                                    
                                                                                                                  </dd>
                                                                                                                  <dt>
                                                                                                                    <strong><a name="item__f_make">$f-&gt;make (@fnames)</a></strong>
                                                                                                                  </dt>
                                                                                                                  <dd>
                                                                                                                    <p>
                                                                                                                      
                                                                                                                      Make either the files named by <code>$fnames</code> (or all outputs if
                                                                                                                      <code>$fname</code> is not supplied), based on the WebMake files read
                                                                                                                      earlier.
                                                                                                                      
                                                                                                                    </dd>
                                                                                                                    <dt>
                                                                                                                      <strong><a name="item__pagetext">$pagetext = $f-&gt;make_to_string ($fname)</a></strong>
                                                                                                                    </dt>
                                                                                                                    <dd>
                                                                                                                      <p>
                                                                                                                        
                                                                                                                        Make the file named by $fname, and output its text to STDOUT, based on the
                                                                                                                        WebMake files read earlier.
                                                                                                                        
                                                                                                                      </dd>
                                                                                                                      <dt>
                                                                                                                        <strong><a name="item__ok">$ok = $f-&gt;can_build($fname);</a></strong>
                                                                                                                      </dt>
                                                                                                                      <dd>
                                                                                                                        <p>
                                                                                                                          
                                                                                                                          Returns 1 if WebMake can build the named file, 0 otherwise.
                                                                                                                          
                                                                                                                        </dd>
                                                                                                                        <dt>
                                                                                                                          <strong><a name="item__num_failures">$num_failures = $f-&gt;finish();</a></strong>
                                                                                                                        </dt>
                                                                                                                        <dd>
                                                                                                                          <p>
                                                                                                                            
                                                                                                                            Finish with a WebMake object and dispose of its internal open files etc.
                                                                                                                            Returns the number of serious failure conditions that occurred (files that
                                                                                                                            could not be created, etc.).
                                                                                                                            
                                                                                                                          </dd>
                                                                                                                        </dl>
                                                                                                                        <hr />
                                                                                                                         <h1><a name="MORE_DOCUMENTATION">MORE DOCUMENTATION</a></h1><p>
                                                                                                                          
                                                                                                                          See also <a href="http://webmake.taint.org/">http://webmake.taint.org/</a>
                                                                                                                          for more information.
                                                                                                                          <hr />
                                                                                                                           <h1><a name="SEE_ALSO">SEE ALSO</a></h1><p>
                                                                                                                             <code>webmake</code> <code>ettext2html</code> <code>ethtml2text</code> <code>HTML::WebMake</code> <code>Text::EtText::EtText2HTML</code> <code>Text::EtText::EtHTML2Text</code><hr />
                                                                                                                             <h1><a name="AUTHOR">AUTHOR</a></h1><p>
                                                                                                                              
                                                                                                                              Justin Mason &lt;jm /at/ jmason.org&gt;
                                                                                                                              <hr />
                                                                                                                               <h1><a name="COPYRIGHT">COPYRIGHT</a></h1><p>
                                                                                                                                
                                                                                                                                WebMake is distributed under the terms of the GNU Public License.
                                                                                                                                <hr />
                                                                                                                                 <h1><a name="AVAILABILITY">AVAILABILITY</a></h1><p>
                                                                                                                                  
                                                                                                                                  The latest version of this library is likely to be available from CPAN as
                                                                                                                                  well as:
                                                                                                                                  <p>
                                                                                                                                    <pre>  <a href="http://webmake.taint.org/">http://webmake.taint.org/</a>
</pre><hr noshade />
                                                                                                                                     <h2>HTML::WebMake::PerlCodeLibrary</h2><!-- INDEX BEGIN -->
                                                                                                                                    <ul>
                                                                                                                                      <li>
                                                                                                                                        <a href="#NAME">NAME</a><li>
                                                                                                                                          <a href="#SYNOPSIS">SYNOPSIS</a><li>
                                                                                                                                            <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                                                                                              <a href="#METHODS">METHODS</a>
                                                                                                                                            </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                        <hr />
                                                                                                                                             <h1><a name="NAME">NAME</a></h1><p>
                                                                                                                                              
                                                                                                                                              PerlCodeLibrary - a selection of functions for use by perl code embedded in
                                                                                                                                              a WebMake file.
                                                                                                                                              <hr />
                                                                                                                                               <h1><a name="SYNOPSIS">SYNOPSIS</a></h1><p>
                                                                                                                                                <pre>  &lt;{perl
</pre><p>
                                                                                                                                                  <pre>    $foo = get_content ($bar);
    [... etc.]
</pre><p>
                                                                                                                                                    <pre>    # or:
</pre><p>
                                                                                                                                                      <pre>    $foo = $self-&gt;get_content ($bar);
    [... etc.]
</pre><p>
                                                                                                                                                        <pre>  }&gt;
</pre><hr />
                                                                                                                                                         <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                          
                                                                                                                                                          These functions allow code embedded in a &lt;{perl}&gt; or
                                                                                                                                                          &lt;{perlout}&gt; section of a WebMake file to be used to script the
                                                                                                                                                          generation of content.
                                                                                                                                                          <p>
                                                                                                                                                            
                                                                                                                                                            Each of these functions is defined both as a standalone function, or as a
                                                                                                                                                            function on the PerlCode object. Code in one of the &lt;{perl*}&gt; sections can access this PerlCode object as the <code>$self</code> variable. If you plan to use WebMake from mod_perl or in a threaded
                                                                                                                                                            environment, be sure to call them as methods on <code>$self</code>.
                                                                                                                                                            <hr />
                                                                                                                                                             <h1><a name="METHODS">METHODS</a></h1><dl>
                                                                                                                                                              <dt>
                                                                                                                                                                <strong><a name="item__expandedtext">$expandedtext = expand ($text);</a></strong>
                                                                                                                                                              </dt>
                                                                                                                                                              <dd>
                                                                                                                                                                <p>
                                                                                                                                                                  
                                                                                                                                                                  Expand a block of text, interpreting any references, user tags, or any
                                                                                                                                                                  other WebMake markup contained within.
                                                                                                                                                                  
                                                                                                                                                                </dd>
                                                                                                                                                                <dt>
                                                                                                                                                                  <strong><a name="item__names">@names = content_matching ($pattern);</a></strong>
                                                                                                                                                                </dt>
                                                                                                                                                                <dd>
                                                                                                                                                                  <p>
                                                                                                                                                                    
                                                                                                                                                                    Find all items of content that match the glob pattern <code>$pattern</code>. If
                                                                                                                                                                    <code>$pattern</code> begins with the prefix <strong>RE:</strong>, it is treated as a regular expression. The list of items returned is not
                                                                                                                                                                    in any logical order.
                                                                                                                                                                    
                                                                                                                                                                  </dd>
                                                                                                                                                                  <dt>
                                                                                                                                                                    <strong><a name="item__objs">@objs = content_names_to_objects (@names);</a></strong>
                                                                                                                                                                  </dt>
                                                                                                                                                                  <dd>
                                                                                                                                                                    <p>
                                                                                                                                                                      
                                                                                                                                                                      Given a list of content names, convert to the corresponding list of content
                                                                                                                                                                      objects, ie. objects of type <code>HTML::WebMake::Content</code>.
                                                                                                                                                                      
                                                                                                                                                                    </dd>
                                                                                                                                                                    <dt>
                                                                                                                                                                      <strong><a name="item__obj">$obj = get_content_object ($name);</a></strong>
                                                                                                                                                                    </dt>
                                                                                                                                                                    <dd>
                                                                                                                                                                      <p>
                                                                                                                                                                        
                                                                                                                                                                        Given a content name, convert to the corresponding content object, ie.
                                                                                                                                                                        objects of type <code>HTML::WebMake::Content</code>.
                                                                                                                                                                        
                                                                                                                                                                      </dd>
                                                                                                                                                                      <dt>
                                                                                                                                                                        <strong>@names = content_objects_to_names (@objs);</strong>
                                                                                                                                                                      </dt>
                                                                                                                                                                      <dd>
                                                                                                                                                                        <p>
                                                                                                                                                                          
                                                                                                                                                                          Given a list of objects of type <code>HTML::WebMake::Content</code>, convert to the corresponding list of content name strings.
                                                                                                                                                                          
                                                                                                                                                                        </dd>
                                                                                                                                                                        <dt>
                                                                                                                                                                          <strong><a name="item__sortedobjs">@sortedobjs = sort_content_objects ($sortstring, @objs);</a></strong>
                                                                                                                                                                        </dt>
                                                                                                                                                                        <dd>
                                                                                                                                                                          <p>
                                                                                                                                                                            
                                                                                                                                                                            Sort a list of content objects by the sort string <code>$sortstring</code>. See ''sorting.html'' in the WebMake documentation for details on sort
                                                                                                                                                                            strings.
                                                                                                                                                                            
                                                                                                                                                                          </dd>
                                                                                                                                                                          <dt>
                                                                                                                                                                            <strong>@names = sorted_content_matching ($sortstring, $pattern);</strong>
                                                                                                                                                                          </dt>
                                                                                                                                                                          <dd>
                                                                                                                                                                            <p>
                                                                                                                                                                              
                                                                                                                                                                              Find all items of content that match the glob-style pattern <code>$pattern</code>. The list of items returned is ordered according to the sort string <code>$sortstring</code>. If <code>$pattern</code> begins with the prefix <strong>RE:</strong>, it is treated as a regular expression.
                                                                                                                                                                              <p>
                                                                                                                                                                                
                                                                                                                                                                                See ''sorting.html'' in the WebMake documentation for details on sort
                                                                                                                                                                                strings.
                                                                                                                                                                                <p>
                                                                                                                                                                                  
                                                                                                                                                                                  This, by the way, is essentially implemented as follows:
                                                                                                                                                                                  <p>
                                                                                                                                                                                    <pre>        my @list = $self-&gt;content_matching ($pattern);
        @list = $self-&gt;content_names_to_objects (@list);
        @list = $self-&gt;sort_content_objects ($sortstring, @list);
        return $self-&gt;content_objects_to_names (@list);
</pre>
                                                                                                                                                                                  </dd>
                                                                                                                                                                                  <dt>
                                                                                                                                                                                    <strong><a name="item__str">$str = get_content ($name);</a></strong>
                                                                                                                                                                                  </dt>
                                                                                                                                                                                  <dd>
                                                                                                                                                                                    <p>
                                                                                                                                                                                      
                                                                                                                                                                                      Get the item of content named <code>$name</code>. Equivalent to a $ {content_reference}.
                                                                                                                                                                                      
                                                                                                                                                                                    </dd>
                                                                                                                                                                                    <dt>
                                                                                                                                                                                      <strong><a name="item__list">@list = get_list ($name);</a></strong>
                                                                                                                                                                                    </dt>
                                                                                                                                                                                    <dd>
                                                                                                                                                                                      <p>
                                                                                                                                                                                        
                                                                                                                                                                                        Get the item of content named, but in Perl list format. It is assumed that
                                                                                                                                                                                        the list is stored in the content item in whitespace-separated format.
                                                                                                                                                                                        
                                                                                                                                                                                      </dd>
                                                                                                                                                                                      <dt>
                                                                                                                                                                                        <strong><a name="item_set_content">set_content ($name, $value);</a></strong>
                                                                                                                                                                                      </dt>
                                                                                                                                                                                      <dd>
                                                                                                                                                                                        <p>
                                                                                                                                                                                          
                                                                                                                                                                                          Set a content chunk to the value provided. This content will not appear in
                                                                                                                                                                                          a sitemap, and navigation links will never point to it.
                                                                                                                                                                                          <p>
                                                                                                                                                                                            
                                                                                                                                                                                            Returns the content object created.
                                                                                                                                                                                            
                                                                                                                                                                                          </dd>
                                                                                                                                                                                          <dt>
                                                                                                                                                                                            <strong><a name="item_set_list">set_list ($name, @values);</a></strong>
                                                                                                                                                                                          </dt>
                                                                                                                                                                                          <dd>
                                                                                                                                                                                            <p>
                                                                                                                                                                                              
                                                                                                                                                                                              Set a content chunk to a list containing the values provided, separated by
                                                                                                                                                                                              spaces. This content will not appear in a sitemap, and navigation links
                                                                                                                                                                                              will never point to it.
                                                                                                                                                                                              <p>
                                                                                                                                                                                                
                                                                                                                                                                                                Returns the content object created.
                                                                                                                                                                                                
                                                                                                                                                                                              </dd>
                                                                                                                                                                                              <dt>
                                                                                                                                                                                                <strong><a name="item_set_mapped_content">set_mapped_content ($name, $value, $upname);</a></strong>
                                                                                                                                                                                              </dt>
                                                                                                                                                                                              <dd>
                                                                                                                                                                                                <p>
                                                                                                                                                                                                  
                                                                                                                                                                                                  Set a content chunk to the value provided. This content will appear in a
                                                                                                                                                                                                  sitemap and the navigation hierarchy. <code>$upname</code> should be the name of it's parent content item. This item must not be
                                                                                                                                                                                                  metadata, or other dynamically-generated content; only first-class mapped
                                                                                                                                                                                                  content can be used.
                                                                                                                                                                                                  <p>
                                                                                                                                                                                                    
                                                                                                                                                                                                    Returns the content object created.
                                                                                                                                                                                                    
                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                    <strong><a name="item_del_content">del_content ($name);</a></strong>
                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                    <p>
                                                                                                                                                                                                      
                                                                                                                                                                                                      Delete a named content chunk.
                                                                                                                                                                                                      
                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                      <strong>@names = url_matching ($pattern);</strong>
                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                      <p>
                                                                                                                                                                                                        
                                                                                                                                                                                                        Find all URLs (from &lt;out&gt; and &lt;media&gt; tags) whose name matches the glob-style pattern <code>$pattern</code>. The names of the URLs, not the URLs themselves, are returned. If <code>$pattern</code> begins with the prefix <strong>RE:</strong>, it is treated as a regular expression.
                                                                                                                                                                                                        
                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                        <strong><a name="item__url">$url = get_url ($name);</a></strong>
                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                        <p>
                                                                                                                                                                                                          
                                                                                                                                                                                                          Get a named URL. Equivalent to an $ (url_reference).
                                                                                                                                                                                                          
                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                          <strong><a name="item_set_url">set_url ($name, $url);</a></strong>
                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                          <p>
                                                                                                                                                                                                            
                                                                                                                                                                                                            Set an URL to the value provided.
                                                                                                                                                                                                            
                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                            <strong><a name="item_del_url">del_url ($name);</a></strong>
                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                            <p>
                                                                                                                                                                                                              
                                                                                                                                                                                                              Delete an URL.
                                                                                                                                                                                                              
                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                            <dt>
                                                                                                                                                                                                              <strong><a name="item__listtext">$listtext = make_list ($itemname, @namelist);</a></strong>
                                                                                                                                                                                                            </dt>
                                                                                                                                                                                                            <dd>
                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                
                                                                                                                                                                                                                Generate a list by iterating through the <code>@namelist</code>, setting the content item
                                                                                                                                                                                                                <code>item</code> to the current name, and interpreting the content chunk named
                                                                                                                                                                                                                <code>$itemname</code>. This content chunk should refer to <code>PerlCodeLibrary.pm</code> appropriately.
                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  Each resulting block of content is appended to a $listtext, which is
                                                                                                                                                                                                                  finally returned.
                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                    
                                                                                                                                                                                                                    See the <code>news_site.wmk</code> sample site for an example of this in use.
                                                                                                                                                                                                                    
                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                    <strong><a name="item_define_tag">define_tag ($tagname, \&amp;amp;handlerfn, @required_attributes);</a></strong>
                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                      
                                                                                                                                                                                                                      Define a tag for use in content items. Any occurrences of this tag, with at
                                                                                                                                                                                                                      least the set of attributes defined in @required_attributes, will cause the
                                                                                                                                                                                                                      handler function referred to by handlerfn to be called.
                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        Handler functions are called as fcllows:
                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                          <pre>        handler ($tagname, $attrs, $text, $perlcode);
</pre><p>
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            Where <code>$tagname</code> is the name of the tag, <code>$attrs</code> is
                                                                                                                                                                                                                            a reference to a hash containing the attribute names and the values used in
                                                                                                                                                                                                                            the tag, and <code>$text</code> is the text between the start and end tags.
                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                               <code>$perlcode</code> is the PerlCode object, allowing you to write proper
                                                                                                                                                                                                                              object-oriented code that can be run in a threaded environment or from
                                                                                                                                                                                                                              mod_perl. This can be ignored if you like.
                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                
                                                                                                                                                                                                                                This function returns an empty string.
                                                                                                                                                                                                                                
                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                <strong><a name="item_define_empty_tag">define_empty_tag ($tagname, \&amp;amp;handlerfn, @required_attributes);</a></strong>
                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                  Define a tag for use in content items. This is identical to define_tag
                                                                                                                                                                                                                                  above, but is intended for use to define ''empty'' tags, ie. tags which
                                                                                                                                                                                                                                  occur alone, not as part of a start and end tag pair.
                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    The handler in this case is called with an empty string for the
                                                                                                                                                                                                                                    <code>$text</code> argument.
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                    <strong><a name="item_define_preformat_tag">define_preformat_tag ($tagname, \&amp;amp;handlerfn, @required_attributes);</a></strong>
                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                      Identical to <em>define_tag</em>, above, with one difference; these tags will be interpreted <strong>before</strong> the content undergoes any format conversion.
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                      <strong><a name="item_define_empty_preformat_tag">define_empty_preformat_tag ($tagname, \&amp;amp;handlerfn, @required_attributes);</a></strong>
                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                        Identical to <em>define_empty_tag</em>, above, with one difference; these tags will be interpreted <strong>before</strong> the content undergoes any format conversion.
                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                        <strong><a name="item_define_wmk_tag">define_wmk_tag ($tagname, \&amp;amp;handlerfn, @required_attributes);</a></strong>
                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          Define a tag for use in the WebMake file.
                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                            Aside from operating on the WebMake file instead of inside content items,
                                                                                                                                                                                                                                            this is otherwise identical to define_tag above,
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                            <strong><a name="item_define_empty_wmk_tag">define_empty_wmk_tag ($tagname, \&amp;amp;handlerfn, @required_attributes);</a></strong>
                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              Define an empty, aka. standalone, tag for use in the WebMake file.
                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                Aside from operating on the WebMake file instead of inside content items,
                                                                                                                                                                                                                                                this is otherwise identical to define_tag above,
                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                                <strong>$obj = get_root_content_object();</strong>
                                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                  Get the content object representing the ''root'' of the site map. Returns
                                                                                                                                                                                                                                                  undef if no root object exists, or the WebMake file does not contain a
                                                                                                                                                                                                                                                  &amp;lt;sitemap&amp;gt; command.
                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                  <strong><a name="item__name">$name = get_current_main_content();</a></strong>
                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                    Get the ''main'' content on the current output page. The ''main'' content
                                                                                                                                                                                                                                                    is defined as the most recently referenced content item which (a) is not
                                                                                                                                                                                                                                                    generated content (perl code, sitemaps, breadcrumb trails etc.), and (b)
                                                                                                                                                                                                                                                    has its
                                                                                                                                                                                                                                                    <code>map</code> attribute set to ``true''.
                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                      Note that this API should only be called from a deferred content reference;
                                                                                                                                                                                                                                                      otherwise the ''main'' content item may not have been referenced by the
                                                                                                                                                                                                                                                      time this API is called.
                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                         <code>undef</code> is returned if no main content item has been referenced.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                        <strong><a name="item__main">$main = get_webmake_main_object();</a></strong>
                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          Get the current WebMake interpreter's instance of <code>HTML::WebMake::Main</code>
                                                                                                                                                                                                                                                          object. Virtually all of WebMake's functionality and internals can be
                                                                                                                                                                                                                                                          accessed through this.
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                      </dl>
                                                                                                                                                                                                                                                      <hr noshade />
                                                                                                                                                                                                                                                      <hr size="4" />
                                                                                                                                                                                                                                                      <h1>Contents for the 'Manual Pages' section</h1><ul>
                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                            <a href="webmake.html">webmake(1)</a> - manual page
                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                      </ul>
                                                                                                                                                                                                                                                      <hr />
                                                                                                                                                                                                                                                       <h2>webmake(1)</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                      <ul>
                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                          <a href="#NAME">NAME</a><li>
                                                                                                                                                                                                                                                            <a href="#SYNOPSIS">SYNOPSIS</a><li>
                                                                                                                                                                                                                                                              <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                                                                                                                                                                                                                <a href="#OPTIONS">OPTIONS</a><li>
                                                                                                                                                                                                                                                                  <a href="#INSTALLATION">INSTALLATION</a><li>
                                                                                                                                                                                                                                                                    <a href="#ENVIRONMENT">ENVIRONMENT</a><li>
                                                                                                                                                                                                                                                                      <a href="#SEE_ALSO">SEE ALSO</a><li>
                                                                                                                                                                                                                                                                        <a href="#AUTHOR">AUTHOR</a><li>
                                                                                                                                                                                                                                                                          <a href="#PREREQUISITES">PREREQUISITES</a><li>
                                                                                                                                                                                                                                                                            <a href="#COREQUISITES">COREQUISITES</a>
                                                                                                                                                                                                                                                                          </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <hr />
                                                                                                                                                                                                                                                                           <h1><a name="NAME">NAME</a></h1><p>
                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                            webmake - a simple web site management system, allowing an entire site to
                                                                                                                                                                                                                                                                            be created from a set of text and markup files and one WebMake file.
                                                                                                                                                                                                                                                                            <hr />
                                                                                                                                                                                                                                                                             <h1><a name="SYNOPSIS">SYNOPSIS</a></h1><p>
                                                                                                                                                                                                                                                                              <pre>  webmake [option ...]
</pre><p>
                                                                                                                                                                                                                                                                                <pre>  webmake [option ...] [-f webmakefile]
</pre><p>
                                                                                                                                                                                                                                                                                  <pre>  webmake [option ...] [-R dir_or_file]
</pre><hr />
                                                                                                                                                                                                                                                                                   <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                    WebMake is a simple web site management system, allowing an entire site to
                                                                                                                                                                                                                                                                                    be created from a set of text and markup files and one WebMake file.
                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                      It requires no dynamic scripting capabilities on the server; WebMake sites
                                                                                                                                                                                                                                                                                      can be deployed to a plain old FTP site without any problems.
                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                        It allows the separation of responsibilities between the content editors,
                                                                                                                                                                                                                                                                                        the HTML page designers, and the site architect; only the site architect
                                                                                                                                                                                                                                                                                        needs to edit the WebMake file itself, or know perl or WebMake code.
                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          A multi-level website can be generated entirely from 1 or more WebMake
                                                                                                                                                                                                                                                                                          files containing content, links to content files, perl code (if needed),
                                                                                                                                                                                                                                                                                          and output instructions. Since the file-to-page mapping no longer applies,
                                                                                                                                                                                                                                                                                          and since elements of pages can be loaded from different files, this means
                                                                                                                                                                                                                                                                                          that standard file access permissions can be used to restrict editing by
                                                                                                                                                                                                                                                                                          role.
                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            Text can be edited as standard HTML, converted from plain text (using the
                                                                                                                                                                                                                                                                                            included Text::EtText module), or converted from any other format by adding
                                                                                                                                                                                                                                                                                            a conversion method to the WebMake::FormatConvert module.
                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                              Since URLs can be referred to symbolically, pages can be moved around and
                                                                                                                                                                                                                                                                                              URLs changed by changing just one line. All references to that URL will
                                                                                                                                                                                                                                                                                              then change automatically.
                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                Content items and output URLs can be generated, altered, or read in
                                                                                                                                                                                                                                                                                                dynamically using perl code. Perl code can even be used to generate other
                                                                                                                                                                                                                                                                                                perl code to generate content/output URLs/etc., recursively.
                                                                                                                                                                                                                                                                                                <hr />
                                                                                                                                                                                                                                                                                                 <h1><a name="OPTIONS">OPTIONS</a></h1><dl>
                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                    <strong><a name="item__f">-f</a></strong>
                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                      The WebMake file to read and generate output from. If this option is not
                                                                                                                                                                                                                                                                                                      supplied, the default behaviour is to search the current directory and its
                                                                                                                                                                                                                                                                                                      parents for a file ending in <code>.wmk</code>.
                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                      <strong><a name="item__F">-F</a></strong>
                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                        Force output. Normally if a file is already up to date, it is not modified.
                                                                                                                                                                                                                                                                                                        This will force the file to be re-made.
                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                        <strong><a name="item__r">-r</a></strong>
                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                          Run more quickly, but take more risks. Normally, dynamic content, such as
                                                                                                                                                                                                                                                                                                          Perl sections, sitemaps, or navigation links, are always considered to be
                                                                                                                                                                                                                                                                                                          in need of rebuilding, as mapping their dependencies is often very
                                                                                                                                                                                                                                                                                                          difficult or impossible. This switch forces them to be ignored for
                                                                                                                                                                                                                                                                                                          dependency-tracking purposes, and so an output file that depends on them
                                                                                                                                                                                                                                                                                                          will not be rebuilt unless a normal content item on that page changes.
                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                          <strong><a name="item__b">-b basehref</a></strong>
                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            Rewrite links to be absolute URLs based at this URL. By default, links are
                                                                                                                                                                                                                                                                                                            specified as relative wherever possible.
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                            <strong><a name="item__d">-d basedir</a></strong>
                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                              Generate output, and look for support files (images etc.), relative to this
                                                                                                                                                                                                                                                                                                              directory.
                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                            <dt>
                                                                                                                                                                                                                                                                                                              <strong><a name="item__p">-p</a></strong>
                                                                                                                                                                                                                                                                                                            </dt>
                                                                                                                                                                                                                                                                                                            <dd>
                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                Paranoid mode; do not allow perl code evaluation or accesses to directories
                                                                                                                                                                                                                                                                                                                above the WebMake file.
                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                                                                                                <strong><a name="item__D">-D</a></strong>
                                                                                                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                  Debug mode; more output.
                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                  <strong><a name="item__L">-L</a></strong>
                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                    Debug level; how much debug output to produce. 0 means no debug output, 3
                                                                                                                                                                                                                                                                                                                    means lots.
                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                    <strong><a name="item__C">-C dir</a></strong>
                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                      Change to this directory before reading files or generating output.
                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                      <strong><a name="item__R">-R dir_or_file</a></strong>
                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                        If <strong>dir_or_file</strong> is a directory, change to that directory, or if it is a file, change to
                                                                                                                                                                                                                                                                                                                        that file's parent directory, before starting.
                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                        <strong><a name="item__s">-s</a></strong>
                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          List source files that would be used to generate this site, one per line.
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                          <strong><a name="item__o">-o</a></strong>
                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                            List output files that would be generated to build this site, one per line.
                                                                                                                                                                                                                                                                                                                            When you're using CVS to replicate a site, this comes in handy, as you know
                                                                                                                                                                                                                                                                                                                            you can safely overwrite changes in these files when doing a <code>cvs update</code>.
                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                        </dl>
                                                                                                                                                                                                                                                                                                                        <hr />
                                                                                                                                                                                                                                                                                                                         <h1><a name="INSTALLATION">INSTALLATION</a></h1><p>
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          The <strong>webmake</strong> command is part of the <strong>HTML::WebMake</strong> Perl module. Install this as a normal Perl module, using <code>perl -MCPAN -e shell</code>, or by hand.
                                                                                                                                                                                                                                                                                                                          <hr />
                                                                                                                                                                                                                                                                                                                           <h1><a name="ENVIRONMENT">ENVIRONMENT</a></h1><p>
                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                            No environment variables, aside from those used by perl, are required to be
                                                                                                                                                                                                                                                                                                                            set.
                                                                                                                                                                                                                                                                                                                            <hr />
                                                                                                                                                                                                                                                                                                                             <h1><a name="SEE_ALSO">SEE ALSO</a></h1><p>
                                                                                                                                                                                                                                                                                                                               <code>webmake</code><p>
                                                                                                                                                                                                                                                                                                                                 <code>ettext2html</code><p>
                                                                                                                                                                                                                                                                                                                                   <code>ethtml2text</code><p>
                                                                                                                                                                                                                                                                                                                                     <code>HTML::WebMake</code><p>
                                                                                                                                                                                                                                                                                                                                       <code>Text::EtText</code><hr />
                                                                                                                                                                                                                                                                                                                                       <h1><a name="AUTHOR">AUTHOR</a></h1><p>
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        Justin Mason &lt;jm /at/ jmason.org&gt;
                                                                                                                                                                                                                                                                                                                                        <hr />
                                                                                                                                                                                                                                                                                                                                         <h1><a name="PREREQUISITES">PREREQUISITES</a></h1><p>
                                                                                                                                                                                                                                                                                                                                           <code>HTML::Entities</code><p>
                                                                                                                                                                                                                                                                                                                                             <code>File::Spec</code><p>
                                                                                                                                                                                                                                                                                                                                               <code>File::Path</code><p>
                                                                                                                                                                                                                                                                                                                                                 <code>File::Basename</code><p>
                                                                                                                                                                                                                                                                                                                                                   <code>Carp</code><p>
                                                                                                                                                                                                                                                                                                                                                     <code>Cwd</code><hr />
                                                                                                                                                                                                                                                                                                                                                     <h1><a name="COREQUISITES">COREQUISITES</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                       <code>Image::Size</code> is required to support the IMGSIZE tag. If this tag is not used, or if the
                                                                                                                                                                                                                                                                                                                                                      module is not available, <strong>webmake</strong> can still operate acceptably.<hr noshade />
                                                                                                                                                                                                                                                                                                                                                      <hr size="4" />
                                                                                                                                                                                                                                                                                                                                                      <h1>Contents for the 'Plugins and Libraries' section</h1><ul>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                            <a href="csvtable_tag.wmk.html">csvtable_tag.wmk</a> - define a HTML table using comma-separated values
                                                                                                                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                            <a href="download_tag.wmk.html">download_tag.wmk</a> - Tag for quick download links to files
                                                                                                                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                            <a href="dump_vars.wmk.html">dump_vars.wmk</a> - dump all WebMake variables and content items
                                                                                                                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                            <a href="navtree.wmk.html">navtree.wmk</a> - WebMake tag to generate an alternative per-page sitemap
                                                                                                                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                            <a href="safe_tag.wmk.html">safe_tag.wmk</a> - Tag to ''make safe'' WebMake, EtText or HTML data
                                                                                                                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                            <a href="sitetree.wmk.html">sitetree.wmk</a> - WebMake tag to generate a per-page sitemap
                                                                                                                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                            <a href="thumbnail_tag.wmk.html">thumbnail_tag.wmk</a> - Tag to create ''thumbnail'' links for photo albums
                                                                                                                                                                                                                                                                                                                                                          </p>
                                                                                                                                                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                                                                                                                                      </ul>
                                                                                                                                                                                                                                                                                                                                                      <hr />
                                                                                                                                                                                                                                                                                                                                                       <h2>csvtable_tag.wmk</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                                                                                                                      <ul>
                                                                                                                                                                                                                                                                                                                                                        <li>
                                                                                                                                                                                                                                                                                                                                                          <a href="#LOADING">LOADING</a><li>
                                                                                                                                                                                                                                                                                                                                                            <a href="#HTML_TAGS">HTML TAGS</a><li>
                                                                                                                                                                                                                                                                                                                                                              <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                                                                                                                                                                                                                                                                                                                <a href="#EXAMPLE">EXAMPLE</a><li>
                                                                                                                                                                                                                                                                                                                                                                  <a href="#THANKS">THANKS</a>
                                                                                                                                                                                                                                                                                                                                                                </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <hr />
                                                                                                                                                                                                                                                                                                                                                                 <h1><a name="LOADING">LOADING</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                  <pre>  &lt; use plugin=&quot;csvtable_tag&quot; /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                   <h1><a name="HTML_TAGS">HTML TAGS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                    <pre>  &lt; csvtable [delimiter=&quot;char&quot;] [HTML table attributes] &gt;
  [...cells...]
  &lt; /csvtable &gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                     <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                      This WebMake Perl library provides a tag to allow HTML tables to be
                                                                                                                                                                                                                                                                                                                                                                      constructed, quickly, using a tab-, comma-, or pipe-separated value table.
                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        Firstly, pick a delimiter character, such as <code>|</code>. Set the <code>delimiter</code>
                                                                                                                                                                                                                                                                                                                                                                        attribute to this character.
                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                          Each line of the CSV table will become a &lt; TR &gt;; each
                                                                                                                                                                                                                                                                                                                                                                          delimiter-separated cell will be enclosed in a &lt; TD &gt; tag pair.
                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                            Attributes for the HTML table tag itself, can be provided as attributes to
                                                                                                                                                                                                                                                                                                                                                                            this tag; they will be passed through into the resulting &lt; TABLE &gt;
                                                                                                                                                                                                                                                                                                                                                                            tag.
                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                              By default, items inside the tables are represented as &lt; TD &gt; cells,
                                                                                                                                                                                                                                                                                                                                                                              with no attributes. Certain special line prefixes allow control over
                                                                                                                                                                                                                                                                                                                                                                              formatting of table items, as follows. These are all case-insensitive, and
                                                                                                                                                                                                                                                                                                                                                                              whitespace after them will be stripped; but they must start on the first
                                                                                                                                                                                                                                                                                                                                                                              character of the line (no leading spaces), and, despite how they're
                                                                                                                                                                                                                                                                                                                                                                              rendered here, should not contain any spaces between the angle brackets.
                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                Blank lines are skipped.
                                                                                                                                                                                                                                                                                                                                                                                <dl>
                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item__">&lt; !-- .... -- &gt;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                      Comments, a la HTML.
                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                      <strong>&lt; csvfmt &gt;</strong>
                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                        The rest of the line is used to specify the format to be used for each line
                                                                                                                                                                                                                                                                                                                                                                                        afterwards, until the end of the &lt; csvtable &gt;, or until the next &lt;
                                                                                                                                                                                                                                                                                                                                                                                        csvfmt &gt; line.
                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                          The line should end in a &lt; /csvfmt &gt; closing tag.
                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                            Specify a &lt; tr &gt;...&lt; /tr &gt; block, with $1, $2, $3, etc. for the
                                                                                                                                                                                                                                                                                                                                                                                            numbered cells (counting from 1). For example:
                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                              <pre>  &lt; csvfmt &gt;&lt; tr &gt;&lt; td &gt;$1&lt; /td &gt;&lt; td &gt;$2&lt; /td &gt;&lt; td &gt;$3&lt; /td &gt;&lt; /tr &gt;&lt; /csvfmt &gt;
</pre>
                                                                                                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                                                                                                          </dl>
                                                                                                                                                                                                                                                                                                                                                                                          <hr />
                                                                                                                                                                                                                                                                                                                                                                                           <h1><a name="EXAMPLE">EXAMPLE</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                            <pre>  &lt; csvtable delimiter=&quot;|&quot; &gt;
  &lt; !-- heading -- &gt;
  &lt; csvfmt &gt;&lt; tr &gt;&lt; th &gt;$1&lt; /th &gt;&lt; th &gt;$2&lt; /th &gt;&lt; th &gt;$3&lt; /th &gt;&lt; /tr &gt;&lt;/ csvfmt &gt;
  First Name|Surname|Title
  &lt; !-- contents -- &gt;
  &lt; csvfmt &gt;&lt; tr &gt;&lt; td &gt;$1&lt; /td &gt;&lt; td &gt;$2&lt; /td &gt;&lt; td &gt;$3&lt; /td &gt;&lt; /tr &gt;&lt;/ csvfmt &gt;
  Justin|Mason|JAPH
  Foo|Bar|Baz
  &lt; /csvtable &gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                             <h1><a name="THANKS">THANKS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                              Thanks to Chris Barrett; he suggested this tag.<hr noshade />
                                                                                                                                                                                                                                                                                                                                                                                               <h2>download_tag.wmk</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                                                                                                                                                              <ul>
                                                                                                                                                                                                                                                                                                                                                                                                <li>
                                                                                                                                                                                                                                                                                                                                                                                                  <a href="#LOADING">LOADING</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                    <a href="#HTML_TAGS">HTML TAGS</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                      <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                        <a href="#OPTIONS_WHICH_AFFECT_THIS_TAG">OPTIONS WHICH AFFECT THIS TAG</a>
                                                                                                                                                                                                                                                                                                                                                                                                      </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <hr />
                                                                                                                                                                                                                                                                                                                                                                                                       <h1><a name="LOADING">LOADING</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                        <pre>  &lt; use plugin=&quot;download_tag&quot; /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                         <h1><a name="HTML_TAGS">HTML TAGS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                          <pre>  &lt; download file=&quot;filename.dat&quot; [text=&quot;template&quot;] /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                           <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                            This WebMake Perl library provides a quick shortcut to make links to files
                                                                                                                                                                                                                                                                                                                                                                                                            for download.
                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                              The attributes supported are as follows:
                                                                                                                                                                                                                                                                                                                                                                                                              <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item_file">file=&quot;filename.dat&quot;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                    The filename to link to. If a file by this filename does not exist, a
                                                                                                                                                                                                                                                                                                                                                                                                                    warning will be printed.
                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                      Filenames should be specified relative to one of the following:
                                                                                                                                                                                                                                                                                                                                                                                                                      <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_the">the top level of the site</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                        <strong>the output file which contains the tag (not recommended, as it precludes
                                                                                                                                                                                                                                                                                                                                                                                                                        the tag being used in another output file in a different directory)</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_a">a directory named in the FileSearchPath WebMake option</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                    </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item_text">text=&quot;template&quot;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                      The link text to be used. The following content items are defined for use
                                                                                                                                                                                                                                                                                                                                                                                                                      inside the link text:
                                                                                                                                                                                                                                                                                                                                                                                                                      <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_download">download.path</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          The real path to the file.
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_download">download.href</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                            The path to the file, relative to the current output file.
                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                            <strong><a name="item_download">download.name</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                              The file's name, without directories.
                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                            <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                              <strong><a name="item_download">download.mdate</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                            </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                            <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                The file's modification date, in <code>ctime()</code> format, e.g. <em>Thu Mar 01 20:54:34
                                                                                                                                                                                                                                                                                                                                                                                                                                2001</em>.
                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                <strong><a name="item_download">download.mtime</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                  The file's modification date, in UNIX time_t format.
                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item_download">download.size_in_k</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                    The file's size, in kilobytes (rounded up).
                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item_download">download.size</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                      The file's size, in bytes.
                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item_download">download.owner</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                        The file's owner.
                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_download">download.group</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                          The file's group.
                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_download">download.tag_attrs</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                            The remaining attributes of the download tag.
                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                        </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                           <code>template</code> can be, and should often be, a $ {content_reference}. The default template
                                                                                                                                                                                                                                                                                                                                                                                                                                          is:
                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <pre>  &lt; a href=&quot;$ {download.href}&quot; $ {download.tag_attrs}&gt;$ {download.name}
  ($ {download.size_in_k}k)&lt; /a&gt;
</pre><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                              Note that this means that any unrecognised attributes of the download tag
                                                                                                                                                                                                                                                                                                                                                                                                                                              itself will become attributes of the A tag.
                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                The default template can be overridden by setting the template content item
                                                                                                                                                                                                                                                                                                                                                                                                                                                <code>download.template</code>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                 <h1><a name="OPTIONS_WHICH_AFFECT_THIS_TAG">OPTIONS WHICH AFFECT THIS TAG</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                   <code>FileSearchPath</code> - WebMake option<hr noshade />
                                                                                                                                                                                                                                                                                                                                                                                                                                                   <h2>dump_vars.wmk</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      <a href="#NAME">NAME</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                        <a href="#LOADING">LOADING</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                          <a href="#CONTENT_ITEMS">CONTENT ITEMS</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href="#DESCRIPTION">DESCRIPTION</a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                          </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                           <h1><a name="NAME">NAME</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                            dump_vars.wmk - dump all WebMake variables and content items
                                                                                                                                                                                                                                                                                                                                                                                                                                                            <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                             <h1><a name="LOADING">LOADING</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              <pre>  &lt; use plugin=&quot;dump_vars&quot; /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                               <h1><a name="CONTENT_ITEMS">CONTENT ITEMS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                <pre>  $ {DumpVars_names}
</pre><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <pre>  $ {DumpVars_full}
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                   <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Some debugging help. If you include this file in your WebMake file, it will
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    define these content items:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item__">$ {DumpVars_names}</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This content contains a list of the names of all content items defined.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong>$ {DumpVars_full}</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This content contains a dump of all content items defined, including their
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            names and their values. It excludes $ {DumpVars_full} and $
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            {DumpVars_names}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <hr noshade />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <h2>navtree.wmk</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href="#LOADING">LOADING</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <a href="#WEBMAKE_TAGS">WEBMAKE TAGS</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <a href="#ATTRIBUTES">ATTRIBUTES</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <a href="#VARIABLES">VARIABLES</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <a href="#THANKS">THANKS</a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <h1><a name="LOADING">LOADING</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <pre>  &lt; use plugin=&quot;navtree&quot; /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <h1><a name="WEBMAKE_TAGS">WEBMAKE TAGS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <pre>  &lt; navtree name=... sitemap=...
        opennode=... closednode=...
        thisnode=... thisleaf=...
        leaf=... depth=... /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This WebMake plugin provides the <code>navtree</code> tag.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <code>navtree</code> operates similarly to the <code>sitetree</code> tag, but displays only a subset of all the site's nodes; it will map all of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            the top-level nodes of the site, the parent nodes of the current page,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            their direct children, and the current page plus it's children up to depth <a href="#item_depth">depth</a>. The effect is similar to a tree-view-based file browser, like Windows
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Explorer.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This differs from the <code>sitetree</code> tag in that <code>sitetree</code> does not support displaying the current page's children.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                So, for a site like this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item__">+ Section 1</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong>+ Section 1 Subsection 1</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong>+ Section 1 Subsection 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong>+ Section 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong>+ Section 2 Subsection 1</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong>+ Section 2 Subsection 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A reference to the site tree on page <code>Section 1</code> would result in a site tree like this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item__">- Main Page</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong>- Section 1</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_Section">Section 1 Subsection 1</a></strong><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_Section">Section 1 Subsection 2</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong>+ Section 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Display of each page's entry in the tree is performed by expanding one of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    the 5 template content items named in the tag's attributes: <a href="#item_closednode">closednode</a>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <a href="#item_opennode">opennode</a>, <a href="#item_thisnode">thisnode</a>, <a href="#item_thisleaf">thisleaf</a> or <a href="#item_leaf">leaf</a>. See the <a href="#item_sitemap">sitemap</a> tag documentation for more details on how to use these (note however that
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <em>is_node</em> variable is not available for sitetrees).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <h1><a name="ATTRIBUTES">ATTRIBUTES</a></h1><dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item_name">name</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The name of the sitetree object. To include a sitetree in a page, refer to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        it using this name, as a deferred reference.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_sitemap">sitemap</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The name of the sitemap. The sitetree requires a sitemap, as the sitemap is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          responsible for mapping out the site and defining which pages and content
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          items are included.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_closednode">closednode</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A content item which is evaluated to display a ''closed'' node, ie. a node
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            which is not on the path to the current page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <strong><a name="item_opennode">opennode</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A content item which is evaluated to display an ''open'' node, one which is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              on the path to the current page. As for the <a href="#item_sitemap">sitemap</a> tag's <code>node</code> attribute, this content item must include a reference to the <strong>list</strong> variable, which will contain all the entries for the pages beneath it in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              the hierarchy.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <strong><a name="item_rootnode">rootnode</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A content item which is evaluated to display an ''open'' root node. It
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                defaults to <a href="#item_opennode">opennode</a> if not specified. It may be used to generate ''multirooted'' tree (a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                forest). In that case you should create a dummy root content (it upsets
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                sitemap code if you dont have one single root) and create <a href="#item_rootnode">rootnode</a> template to output only the list with apropriate decorations.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <strong><a name="item_thisnode">thisnode</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A content item which is evaluated to display the current page if it is an
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  inner node, that is it has children. Iff <a href="#item_depth">depth</a> &gt; 0, <a href="#item_thisnode">thisnode</a> must include a reference to the <strong>list</strong> variable.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item_thisleaf">thisleaf</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    A content item which is evaluated to display the current page if it is a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    leaf.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item_leaf">leaf</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A content item which is evaluated to display a leaf-node page, one which
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      has no pages beneath it in the hierarchy.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item_depth">depth</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        How many levels beneath the current page should be listed. 0 means none
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (behavior of <code>sitetree</code> tag). The default is 1 which means to list direct children of the current
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        node.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <h1><a name="VARIABLES">VARIABLES</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Following variables (content items) are defined for use in templates:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_title">title</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The <a href="#item_title">title</a> metadatum of the node.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_score">score</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The <a href="#item_score">score</a> metadatum of the node.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <strong>name</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The name of the node.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <strong><a name="item_url">url</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The url of the node. Should be referenced using url reference (<code>$ (url)</code>).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <strong><a name="item_level">level</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The level of the node, that is how deep it is in the tree. Root node has
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  level 0, it's children 1, their children 2 and so on.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item_sublvl">sublvl</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The level under current page. This is similar to <a href="#item_level">level</a>, except that current page is considered root. -1 for nodes not descendant
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    from current page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item_left">left</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This is <a href="#item_depth">depth</a> above the current node and <code>depth - sublvl</code> for the descendants of the current node.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item_is_leaf">is_leaf</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This is 1 for leaf nodes and 0 for inner nodes (both closed and open).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_list">list</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This is the list of children, which should be output by open nodes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <h1><a name="THANKS">THANKS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Thanks to Jan Hudec &amp;lt;bulb /at/ ucw.cz&amp;gt;, who provided this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        tag.<hr noshade />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <h2>safe_tag.wmk</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href="#LOADING">LOADING</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <a href="#HTML_TAGS">HTML TAGS</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <a href="#PERL_CODE">PERL CODE</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <a href="#DESCRIPTION">DESCRIPTION</a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <h1><a name="LOADING">LOADING</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <pre>  &lt; use plugin=&quot;safe_tag&quot; /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   <h1><a name="HTML_TAGS">HTML TAGS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <pre>  &lt; safe&gt;
  ...some data with HTML tags or WebMake references
  &lt; /safe&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <h1><a name="PERL_CODE">PERL CODE</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <pre>  &lt;{perl
</pre><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <pre>    $safe_text = make_safe ($unsafe_text);
</pre><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <pre>  }&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This WebMake Perl library provides a way to ``make safe'' WebMake, EtText
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            or HTML data, escaping all metacharacters appropriately so that content
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            references, EtText links or HTML tags are not interpreted.<hr noshade />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <h2>sitetree.wmk</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <a href="#LOADING">LOADING</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <a href="#WEBMAKE_TAGS">WEBMAKE TAGS</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <a href="#ATTRIBUTES">ATTRIBUTES</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <a href="#THANKS">THANKS</a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <h1><a name="LOADING">LOADING</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <pre>  &lt; use plugin=&quot;sitetree&quot; /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <h1><a name="WEBMAKE_TAGS">WEBMAKE TAGS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <pre>  &lt; sitetree name=... sitemap=...
        opennode=... closednode=...
        thispage=... leaf=... /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This WebMake Perl library provides the <code>sitetree</code> tag.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <code>Sitetree</code> operates similarly to the built-in <a href="#item_sitemap">sitemap</a> tag, but, displays only a subset of all the site's nodes; it will map all
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              of the top-level nodes of the site, and then only the parent nodes of the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              current page. The effect is similar to a tree-view-based file browser, like
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Windows Explorer.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In terms of differences in usage, where <a href="#item_sitemap">sitemap</a> creates a single map which includes every page in the site, <code>sitetree</code> maps only the pages up to and including the current page, and generates a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                map for each individual output page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  So, for a site like this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item__">+ Section 1</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong>+ Section 1 Subsection 1</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong>+ Section 1 Subsection 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong>+ Section 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong>+ Section 2 Subsection 1</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong>+ Section 2 Subsection 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A reference to the site tree on page <code>Section 1 Subsection 1</code> would result in a site tree like this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item__">- Section 1</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong>- Section 1 Subsection 1</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong>+ Section 2</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Display of each page's entry in the tree is performed by expanding one of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                the 4 template content items named in the tag's attributes: <a href="#item_closednode">closednode</a>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <a href="#item_opennode">opennode</a>, <a href="#item_thispage">thispage</a>, or <a href="#item_leaf">leaf</a>. See the <a href="#item_sitemap">sitemap</a> tag documentation for more details on how to use these (note however that
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                the <em>is_node</em> variable is not available for sitetrees).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <h1><a name="ATTRIBUTES">ATTRIBUTES</a></h1><dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item_name">name</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The name of the sitetree object. To include a sitetree in a page, refer to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    it using this name, as a deferred reference.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item_sitemap">sitemap</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The name of the sitemap. The sitetree requires a sitemap, as the sitemap is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      responsible for mapping out the site and defining which pages and content
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      items are included.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item_closednode">closednode</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A content item which is evaluated to display a ''closed'' node, ie. a node
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        which is not on the path to the current page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_opennode">opennode</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A content item which is evaluated to display an ''open'' node, one which is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          on the path to the current page. As for the <a href="#item_sitemap">sitemap</a> tag's <code>node</code> attribute, this content item must include a reference to the <strong>list</strong> variable, which will contain all the entries for the pages beneath it in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          the hierarchy.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_thispage">thispage</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A content item which is evaluated to display the current page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <strong><a name="item_leaf">leaf</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A content item which is evaluated to display a leaf-node page, one which
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              has no pages beneath it in the hierarchy.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           <h1><a name="THANKS">THANKS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Thanks go to Alex Canady, who came up with the idea for this one.<hr noshade />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <h2>thumbnail_tag.wmk</h2><!-- INDEX BEGIN -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <a href="#LOADING">LOADING</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <a href="#HTML_TAGS">HTML TAGS</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <a href="#PERL_CODE">PERL CODE</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <a href="#PERL_FUNCTIONS">PERL FUNCTIONS</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <a href="#EXAMPLES">EXAMPLES</a><li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href="#OPTIONS_WHICH_AFFECT_THIS_TAG">OPTIONS WHICH AFFECT THIS TAG</a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </ul>
<!-- INDEX END -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           <h1><a name="LOADING">LOADING</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <pre>  &lt; use plugin=&quot;thumbnail_tag&quot; /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <h1><a name="HTML_TAGS">HTML TAGS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <pre>  &lt; thumbnail name=&quot;filename.jpg&quot; [text=&quot;template&quot;]
        [bordercolor=&quot;black&quot;] [borderwidth=&quot;1&quot;] [format=&quot;jpg&quot;] /&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <h1><a name="PERL_CODE">PERL CODE</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <pre>  &lt;{perl
</pre><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <pre>    make_thumbnail_table (3, @names_of_images);
</pre><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <pre>  }&gt;
</pre><hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This WebMake Perl library provides a quick shortcut to make thumbnail links
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      to full-sized images, suitable for use in a photo album site or similar.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The library provides support for a &lt; thumbnail &gt; tag, which creates a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        thumbnail of one image, and some helper functions for creating thumbnail
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        pages with lots of images.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The attributes supported by the &lt; thumbnail &gt; tag are as follows:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <strong><a name="item_name">name=&quot;imagename&quot;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The image to link to. This should be the name of a URL reference, loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                from a &lt; media &gt; search, <strong>not</strong> the filename of the image itself.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <strong><a name="item_borderwidth">borderwidth=&quot;n&quot;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If you wish to draw a border around the images, this specifies the border
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  width (in pixels). The default value is 1. This can also be specified by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  setting a template content item called <code>thumbnail.borderwidth</code>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item_bordercolor">bordercolor=&quot;#xxxxxx&quot;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The border colour to draw image borders in. The default value is ``black''
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (or
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <code>#000000</code>). This can also be specified by setting a template content item called <code>thumbnail.bordercolor</code>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item_format">format=&quot;fmt&quot;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The format to use for thumbnail images; default is ``jpg''. Also available:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ``gif'' or ``png''. Any reasonable ImageMagick-supported format will work.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item_text">text=&quot;template&quot;</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The template text to be used for the thumbnail link and img tags. The
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        following content items are defined for use inside the template text. This
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        can also be specified by setting a template content item called
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <code>thumbnail.template</code>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_thumbnail">thumbnail.name</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The name of the image (not the filename, the &lt; media &gt; item name).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <strong><a name="item_thumbnail">thumbnail.path</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The image file's path, with directories.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <strong><a name="item_thumbnail">thumbnail.filename</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The image file's name, without directories.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <strong><a name="item_thumbnail">thumbnail.href</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The path to the full-sized image file, relative to the current output file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <strong><a name="item_thumbnail">thumbnail.thumb_src</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The path to the thumbnail-sized version of the image file, relative to the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    current output file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item_thumbnail">thumbnail.size_in_k</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The full-sized image file's size, in kilobytes (rounded up).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <strong><a name="item_thumbnail">thumbnail.size</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The full-sized image file's size, in bytes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item_thumbnail">thumbnail.full_height / thumbnail.full_width</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The full-sized image file's height and width, in pixels.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <strong><a name="item_thumbnail">thumbnail.height / thumbnail.width</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The thumbnail-sized image file's height and width, in pixels.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <strong><a name="item_thumbnail">thumbnail.tag_attrs</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The remaining attributes of the thumbnail tag.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <code>template</code> can be, and should often be, a $ {content_reference}. The default template
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            is:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <pre>        &lt; div align=center &gt;
          &lt; a href=&quot;$ {thumbnail.href}&quot; &gt;&lt; img
              src=&quot;$ {thumbnail.thumb_src}&quot; alt=&quot;[$ {thumbnail.filename}]&quot;
              height=&quot;$ {thumbnail.height}&quot; width=&quot;$ {thumbnail.width}&quot;
              border=&quot;0&quot; $ {thumbnail.tag_attrs} / &gt;&lt; /a &gt;
          &lt; br / &gt;
          $ [$ {thumbnail.name}.title]
          &lt; br / &gt;
        &lt; /div &gt;
</pre><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Note that this means that any unrecognised attributes of the thumbnail tag
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                itself will become attributes of the IMG tag.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <h1><a name="PERL_FUNCTIONS">PERL FUNCTIONS</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The following Perl functions are provided:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <strong><a name="item__text">$text = make_thumbnail_table ($pics_per_row, @names_of_images);</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This function will lay out a table containing thumbnails, with up to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <code>$pics_per_row</code> pictures on each row. The following template content items can be set to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      customise the behaviour of this tag:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <strong><a name="item__">$ {thumbnail.table.td}</a></strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The template used to wrap each thumbnail. References to $
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          {thumbnail.table.item} will be replaced with the output from the &lt;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          thumbnail &gt; tag itself. Default setting:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <pre>        &lt; td valign=top &gt; $ {thumbnail.table.item} &lt; /td &gt;
</pre>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <strong>$ {thumbnail.table.tr}</strong>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </dt>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The template used to wrap each row of thumbnails. References to $
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              {thumbnail.table.tds} will be replaced with the output from the $
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              {thumbnail.table.td} templates so far for this row. Default setting:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <pre>        &lt; tr &gt; $ {thumbnail.table.tds} &lt; /tr &gt;
</pre>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </dd>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Note that you will have to wrap this up in a &lt; table &gt; tag yourself
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ;)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </dl>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <h1><a name="EXAMPLES">EXAMPLES</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The file <code>examples/thumbnails.wmk</code> in the WebMake distribution.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <h1><a name="OPTIONS_WHICH_AFFECT_THIS_TAG">OPTIONS WHICH AFFECT THIS TAG</a></h1><p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <code>FileSearchPath</code> - WebMake option<hr noshade />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <table width="100%">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <td valign="top">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <strong><a href="http://webmake.taint.org/">WebMake</a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Documentation</strong> (version 2.2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <td valign="top">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div align="right">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       [ <a href="sitetree.wmk.html">Back</a> | <a href="index_01-intro.html">Forward</a> | <a href="index.html">Index</a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | <a href="allinone.html">All&nbsp;In&nbsp;One</a> ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <div align="right">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <a href="http://webmake.taint.org/"> <img src="images/BuiltWithWebMake.png" alt="Built With WebMake" border="0" width="88" height="31" /></a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </font>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </body>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </html>