<?php
define("ABS_PATH", $_SERVER['DOCUMENT_ROOT']);
include(ABS_PATH . "/head_nav.php");
include(ABS_PATH . "/middle.php");
?>
          <div class="section">
            <div class="toc-wrapper">
              <span class="toc-title">Contents:</span>
              <ul class="toc">
                  <li class=""><a href="#SYNOPSIS">SYNOPSIS</a></li>
                  <li class=""><a href="#DESCRIPTION">DESCRIPTION</a></li>
                  <li class=""><a href="#METHODS">METHODS</a></li>
                  <li class="sub"><a href="#method_escape">escape(text)</a></li>
                  <li class="sub"><a href="#method_attributes">attributes(hash)</a></li>
                  <li class="sub"><a href="#method_element">element(type, attributes)</a></li>
                  <li class=""><a href="#DEBUGGING">DEBUGGING</a></li>
                  <li class=""><a href="#AUTHOR">AUTHOR</a></li>
                  <li class=""><a href="#COPYRIGHT">COPYRIGHT</a></li>
                  <li class=""><a href="#SEE_ALSO">SEE ALSO</a></li>
              </ul>
            </div>
          </div>
          
                <div class="pod">
            <div class="section">
              <div class="head">
                <h1 id="SYNOPSIS">SYNOPSIS</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <pre><span class="tt">[% USE HTML %]</span>

<span class="tt">[% HTML.escape("if (a &lt; b &amp;&amp; c &gt; d) ..." %]</span>

<span class="tt">[% HTML.element(table =&gt; { border =&gt; 1, cellpadding =&gt; 2 }) %]</span>

<span class="tt">[% HTML.attributes(border =&gt; 1, cellpadding =&gt; 2) %]</span></pre>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="DESCRIPTION">DESCRIPTION</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      The <code>HTML</code> plugin is a very basic plugin, implementing a few
                      useful methods for generating HTML.
                    </p>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="METHODS">METHODS</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <div class="subsection">
                  <div class="head">
                    <h2 id="method_escape" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">escape(text)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Returns the source text with any HTML reserved characters such as
                          <code>&lt;</code>, <code>&gt;</code>, etc., correctly esacped to their
                          entity equivalents.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_attributes" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">attributes(hash)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Returns the elements of the hash array passed by reference correctly
                          formatted (e.g. values quoted and correctly escaped) as attributes for an
                          HTML element.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_element" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">element(type, attributes)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Generates an HTML element of the specified type and with the attributes
                          provided as an optional hash array reference as the second argument or as
                          named arguments.
                        </p>
                        <pre><span class="tt">[% HTML.element(table =&gt; { border =&gt; 1, cellpadding =&gt; 2 }) %]</span>
<span class="tt">[% HTML.element('table', border=1, cellpadding=2) %]</span>
<span class="tt">[% HTML.element(table =&gt; attribs) %]</span></pre>
                  </div>
                </div>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="DEBUGGING">DEBUGGING</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      The HTML plugin accepts a <code>sorted</code> option as a constructor
                      argument which, when set to any true value, causes the attributes
                      generated by the <code>attributes()</code> method (either directly or via
                      <code>element()</code>) to be returned in sorted order. Order of
                      attributes isn't important in HTML, but this is provided mainly for the
                      purposes of debugging where it is useful to have attributes generated in
                      a deterministic order rather than whatever order the hash happened to
                      feel like returning the keys in.
                    </p>
                    <pre><span class="tt">[% USE HTML(sorted=1) %]</span>
<span class="tt">[% HTML.element( foo =&gt; { charlie =&gt; 1, bravo =&gt; 2, alpha =&gt; 3 } ) %]</span></pre>
                    <p>
                      generates:
                    </p>
                    <pre>&lt;foo alpha="3" bravo="2" charlie="1"&gt;</pre>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="AUTHOR">AUTHOR</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      Andy Wardley &lt;abw@wardley.org&gt; <a
                      href="https://wardley.org/">https://wardley.org/</a>
                    </p>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="COPYRIGHT">COPYRIGHT</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.
                    </p>
                    <p>
                      This module is free software; you can redistribute it and/or modify it
                      under the same terms as Perl itself.
                    </p>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="SEE_ALSO">SEE ALSO</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      <a href="../../../modules/Template/Plugin.php">Template::Plugin</a>
                    </p>
              </div>
            </div>
            
            </div>
<?php include(ABS_PATH . "/footer.php"); ?>
