[ZPT] CVS: Zope/lib/python/Products/PageTemplates/help - tal-repeat.stx:1.7 tales-path.stx:1.6

Amos Latteier amos@zope.com
Thu, 13 Dec 2001 15:55:11 -0500


Update of /cvs-repository/Zope/lib/python/Products/PageTemplates/help
In directory cvs.zope.org:/tmp/cvs-serv31333

Modified Files:
	tal-repeat.stx tales-path.stx 
Log Message:
Changed first and last example to be clearer. Documented the fact that the last path in an alternate path experssion doesn't need to be a path at all.


=== Zope/lib/python/Products/PageTemplates/help/tal-repeat.stx 1.6 => 1.7 ===
       </table>
 
-    Objects (already sorted by meta-type) in groups by meta-type::
+    Insert objects. Seperates groups of objects by meta-type by
+    drawing a rule between them::
 
-      <table border="1">
-        <tr tal:repeat="object objects">
-          <td><span tal:condition="repeat/object/first/meta_type"
-                    tal:replace="object/meta_type">Meta Type</span></td>
-        </tr>
-      </table>
+
+      <div tal:repeat="object objects">
+        <h2 tal:condition="repeat/object/first/meta_type"
+	    tal:content="object/meta_type">Meta Type</h2>
+        <p tal:content="object/getId">Object ID</p>
+        <hr tal:condition="repeat/object/last/meta_type" />
+      </div>
+
+    Note, the objects in the above example should already be sorted by
+    meta-type.


=== Zope/lib/python/Products/PageTemplates/help/tales-path.stx 1.5 => 1.6 ===
       here/some-file 2001_02.html.tar.gz/foo
       root/to/branch | default
+      request/name | string:Anonymous Coward
 
     When a path expression is evaluated, Zope attempts to traverse the
     path, from left to right, until it succeeds or runs out of paths
@@ -39,6 +40,12 @@
 
     If a traversal step fails, evaluation immediately proceeds to the next
     path.  If there are no further paths, an error results.
+
+    The expression in a series of paths seperated by vertical bars can
+    be any TALES expression. For example, 'request/name |
+    string:Anonymous Coward'. This is useful chiefly for providing
+    default values such as strings and numbers which are not
+    expressable as path expressions.
 
     If no path is given the result is *nothing*.