Apache2-PageKit

 view release on metacpan or  search on metacpan

docsrc/reference.xml  view on Meta::CPAN

      corresponds to the URI being view.
      </para>
     </refsect1>
    </refentry>
    <refentry id="content.if">
     <refnamediv>
      <refname>CONTENT_IF, CONTENT_UNLESS, CONTENT_ELSE</refname>
      <refpurpose>
       Displays enclosed section if content sets value to true/false.
      </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
      <synopsis>
       &lt;CONTENT_IF NAME="foo"&gt;
        Text to be included if foo is included in Content and is true
       &lt;CONTENT_ELSE&gt;
        Text to be included if foo not inclued in Content or is false
       &lt;/CONTENT_IF&gt;

       &lt;CONTENT_UNLESS NAME="bar"&gt;
        Text to be included if bar is included in Content and is true
       &lt;/CONTENT_UNLESS&gt;
      </synopsis>
     </refsynopsisdiv>
     <refsect1>
      <title>Description</title>
      <para>
       If the XPath query in the name attribute returns a true value, then the text
       enclosed by the CONTENT_IF tag will be included in the template.
      </para>
      <para>
      Please note: if you ask for loop_context_vars like (__first__, __odd__, __inner__ or __last__)
      that they must be written in lowercase!.
      </para>
     </refsect1>
    </refentry>
   </sect2>
   <sect2 id="model.tags">
    <title>Model tags</title>
    <para>Model tags refer to data set by the output method of the model classes.
      They correspond to the HTML::Template.  The PageKit pre-processor simply
      replaces MODEL with TMPL before running the template through HTML::Template.
    </para>
    <refentry id="model.var">
     <refnamediv>
      <refname>MODEL_VAR</refname>
      <refpurpose>
       Filled in with scalar value set from Model's output method
      </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
      <synopsis>
       &lt;MODEL_VAR NAME="foo"&gt;
      </synopsis>
     </refsynopsisdiv>
     <refsect1>
      <title>Description</title>
      <para>
        This tag is very simple.  It is replaced by the corresponding value set
        in the Model by the output method.  You may also use ESCAPE="HTML" and ESCAPE="URL"
        to escape HTML, and URLs respectively.
      </para>
     </refsect1>
    </refentry>
    <refentry id="model.loop">
     <refnamediv>
      <refname>MODEL_LOOP</refname>
      <refpurpose>Filled in with array reference of hash references set from Model's output method.</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
      <synopsis>
       &lt;MODEL_LOOP NAME="foo"&gt;
         &lt;MODEL_VAR NAME="bar"/&gt;
         &lt;MODEL_VAR NAME="baz"/&gt;
       &lt;/MODEL_LOOP&gt;
      </synopsis>
     </refsynopsisdiv>
     <refsect1>
      <title>Description</title>
      <para>
        This tag used for displaying a "table" of data.  The data is set from
	the model using the output method, and is a reference to an array
	of hash references.  Using the table analogy, the hash references are
	the rows, the keys of the 
	hash references are the column headers, the hash values are the data.
      </para>
     </refsect1>
    </refentry>
    <refentry id="model.if">
     <refnamediv>
      <refname>MODEL_IF, MODEL_UNLESS, MODEL_ELSE</refname>
      <refpurpose>
       Displays enclosed section if model sets value to true/false.
      </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
      <synopsis>
       &lt;MODEL_IF NAME="foo"&gt;
        Text to be included if foo is true
       &lt;MODEL_ELSE&gt;
        Text to be included if foo is false
       &lt;/MODEL_IF&gt;

       &lt;MODEL_UNLESS NAME="bar"&gt;
        Text to be included if bar is false
       &lt;/MODEL_UNLESS&gt;
      </synopsis>
     </refsynopsisdiv>
     <refsect1>
      <title>Description</title>
      <para>
       If the parameter in the name attribute is set to true by the
       <literal>output</literal> method of the Model, then the text
       enclosed by the MODEL_IF tag will be included in the template.
      </para>
     </refsect1>
    </refentry>
   </sect2>
   <sect2 id="pagekit.tags">
    <title>PageKit tags</title>
    <para>



( run in 2.034 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )