cvs: peardoc /en/package/html/html-template-flexy/attribute foreach.xml if.xml

From: Date: Mon, 07 Apr 2003 13:37:13 +0000
Subject: cvs: peardoc /en/package/html/html-template-flexy/attribute foreach.xml if.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-610@lists.php.net to get a copy of this message
alan_k Mon Apr 7 09:37:13 2003 EDT Added files: /peardoc/en/package/html/html-template-flexy/attribute if.xml Modified files: /peardoc/en/package/html/html-template-flexy/attribute foreach.xml Log: initial commit - got to build check this - I think a clean peardoc2 checkout is needed.. Index: peardoc/en/package/html/html-template-flexy/attribute/foreach.xml diff -u peardoc/en/package/html/html-template-flexy/attribute/foreach.xml:1.3 peardoc/en/package/html/html-template-flexy/attribute/foreach.xml:1.4 --- peardoc/en/package/html/html-template-flexy/attribute/foreach.xml:1.3 Mon Mar 10 17:27:43 2003 +++ peardoc/en/package/html/html-template-flexy/attribute/foreach.xml Mon Apr 7 09:37:13 2003 @@ -1,7 +1,7 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.html.html-template-flexy.attribute.foreach"> <refnamediv> - <refname>FOREACH=&quot;variable,key,value&quot;</refname> + <refname>flexy:foreach=&quot;variable,key,value&quot;</refname> <refpurpose>creates a PHP foreach loop using a html attribute</refpurpose> </refnamediv> <refsynopsisdiv> @@ -10,8 +10,8 @@ <funcprototype> <funcdef> <function>Usage</function></funcdef> - <paramdef><parameter>FOREACH=&quot;variable,key,value&quot;</parameter></paramdef> - <paramdef><parameter>FOREACH=&quot;variable,value&quot;</parameter></paramdef> + <paramdef><parameter>flexy:foreach=&quot;variable,key,value&quot;</parameter></paramdef> + <paramdef><parameter>flexy:foreach=&quot;variable,value&quot;</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -79,12 +79,12 @@ <programlisting role="html"> <![CDATA[ <table> - <tr foreach="a,k,v"> + <tr flexy:foreach="a,k,v"> <td>k is {k}, and v is {v}</td> </tr> </table> <table> - <tr foreach="b,v"> + <tr flexy:foreach="b,v"> <td>v is {v}</td> </tr> </table> Index: peardoc/en/package/html/html-template-flexy/attribute/if.xml +++ peardoc/en/package/html/html-template-flexy/attribute/if.xml <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-template-flexy.attribute.if"> <refnamediv> <refname>flexy:if=&quot;variable or method()&quot;</refname> <refpurpose>creates a PHP if conditional tag</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef> <function>Usage</function></funcdef> <paramdef><parameter>flexy:if=&quot;variable&quot;</parameter></paramdef> <paramdef><parameter>flexy:if=&quot;method()&quot;</parameter></paramdef> <paramdef><parameter>flexy:if=&quot;object.method()&quot;</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.html.html-template-flexy.attribute.if.desc"> &title.desc; <para> creates an if condition surrounding the tag that it's included in. </para> </refsect1> <refsect1 id="package.html.html-template-flexy.attribute.if.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string variable</parameter> - relates to $object->variable </para> </listitem> <listitem> <para> <parameter>string method</parameter> - relates to $object->method() </para> </listitem> <listitem> <para> <parameter>string object.method</parameter> relates to $object->object->method() </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.html.html-template-flexy.attribute.if.example"> &title.example; <example> <title>Setting variables for foreach</title> <programlisting role="html"> <![CDATA[ class output { function hasTest() { return false; } function run() { $this->a = true; $this->message = 'oops' $template->outputObject($this); } } ]]> </programlisting> </example> <example> <title>flexy:if in template</title> <programlisting role="html"> <![CDATA[ <a href="{baseURL}/somepath.html" flexy:if="a">this is the a link</a> <a href="{baseURL}/somepath.html" flexy:if="!a">this is not the a link</a> <b flexy:if="hasTest()">hasTest is true</b> <b flexy:if="!hasTest()">hasTest is false</b> <span flexy:if="message" class="error">{message}</span> ]]> </programlisting> </example> <example> <title>Compiled template</title> <programlisting role="html"> <![CDATA[ <?php if ($t->a) { ?><A HREF="<?php echo htmlspecialchars($t->baseURL); ?>/somepath.html">this is the a link</A><?php } ?> <?php if (!$t->a) { ?><A HREF="<?php echo htmlspecialchars($t->baseURL); ?>/somepath.html">this is not the a link</A><?php } ?> <?php if (isset($t) && method_exists($t,'hasTest')) if ($t->hasTest()) { ?><B>hasTest is true</B><?php } ?> <?php if (isset($t) && method_exists($t,'hasTest')) if (!$t->hasTest()) { ?><B>hasTest is false</B><?php } ?> <?php if ($t->message) { ?><SPAN CLASS="error"><?php echo htmlspecialchars($t->message); ?></SPAN><?php } ?> ]]> </programlisting> </example> <example> <title>Simple ouput example</title> <programlisting role="html"> <![CDATA[ this is the a link hasTest is false oops ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.pear.doc (#610) next »