[MKDoc-commit] Added select list and table row examples from the
email list to the
chris at mkdoc.demon.co.uk
chris at mkdoc.demon.co.uk
Wed Jan 5 11:08:57 GMT 2005
Log Message:
-----------
Added select list and table row examples from the email list to the documentation.
Modified Files:
--------------
Petal/lib:
Petal.pm
-------------- next part --------------
Index: Petal.pm
===================================================================
RCS file: /var/spool/cvs/Petal/lib/Petal.pm,v
retrieving revision 1.122
retrieving revision 1.123
diff -Llib/Petal.pm -Llib/Petal.pm -u -r1.122 -r1.123
--- lib/Petal.pm
+++ lib/Petal.pm
@@ -1054,6 +1054,48 @@
<li tal:repeat="user system/user_list">$user/real_name</li>
+A select list with one item selected:
+
+ <select>
+ <option
+ selected="selected"
+ tal:attributes="value self/selected_lang/value"
+ tal:content="self/selected_lang/label"
+ >English</option>
+ <option
+ value="i-klingon"
+ tal:repeat="lang self/unselected_langs;"
+ tal:attributes="value lang/value"
+ tal:content="lang/label"
+ >Klingon</option>
+ </select>
+
+A table with rows of alternation colours set via CSS:
+
+ <table>
+ <div
+ tal:omit-tag=""
+ tal:repeat="audience self/audiences"
+ >
+ <tr
+ class="odd"
+ tal:condition="true: repeat/odd"
+ >
+ <td>
+ This a odd row, it comes before the even row.
+ </td>
+ </tr>
+ <tr
+ class="even"
+ tal:condition="true: repeat/even"
+ >
+ <td>
+ This a even row.
+ </td>
+ </tr>
+ </div>
+ </table>
+
Why?
Repeat statements are used to loop through a list of values,
More information about the MKDoc-commit
mailing list