[ZPT] CVS: Products/PageTemplates/help - tal-omit-tag.stx:1.2

Amos Latteier amos@zope.com
Tue, 25 Sep 2001 13:30:04 -0400


Update of /cvs-repository/Products/PageTemplates/help
In directory cvs.zope.org:/tmp/cvs-serv13628

Modified Files:
	tal-omit-tag.stx 
Log Message:
added docs for tal:omit-tag

=== Products/PageTemplates/help/tal-omit-tag.stx 1.1 => 1.2 ===
   Syntax
 
-    XXX
+    'tal:omit-tag' syntax::
+  
+      argument ::= [expression]
 
   Description
 
-    XXX
+    The 'tal:omit-tag' statement leaves the contents of a tag in place
+    while omitting the surrounding start and end tag.
+
+    If its expression evaluates to a *false* value, then normal
+    processing of the element continues and the tag is not omitted.
+    If the expression evaluates to a *true* value, or there is no
+    expression, the statement tag is replaced with its contents. 
+
+    Zope treats empty strings, empty sequences, zero, None, *nothing*,
+    and *default* at false. All other values are considered true.
 
   Examples
 
-    XXX
\ No newline at end of file
+    Unconditionally omitting a tag::
+
+      <div tal:omit-tag="" comment="This tag will be removed">
+        <i>...but this text will remain.</i>
+      </div>
+
+    Conditionally omitting a tag::
+
+      <b tal:omit-tag="not:bold">I may be bold.</b>
+  
+    The above example will omit the 'b' tag if the variable 'bold' is
+    false.
+
+    Creating ten paragraph tags, with no enclosing tag::
+
+      <span tal:repeat="n python:range(10)"
+            tal:omit-tag="">
+        <p tal:content="n">1</p>
+      </span>
+    
\ No newline at end of file