[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/README.txt - Add a failing test for global 'path' function that works with standard ZPT but not with z3c.pt
Sidnei da Silva
sidnei at enfoldsystems.com
Mon Jan 19 17:27:24 EST 2009
Log message for revision 94864:
- Add a failing test for global 'path' function that works with standard ZPT but not with z3c.pt
Changed:
U z3c.pt/trunk/src/z3c/pt/README.txt
-=-
Modified: z3c.pt/trunk/src/z3c/pt/README.txt
===================================================================
--- z3c.pt/trunk/src/z3c/pt/README.txt 2009-01-19 20:12:25 UTC (rev 94863)
+++ z3c.pt/trunk/src/z3c/pt/README.txt 2009-01-19 22:27:24 UTC (rev 94864)
@@ -165,3 +165,22 @@
#region {
background: #ccc;
}
+
+
+Global Path Expression
+----------------------
+
+Just like ``zope.pagetemplate``, it is possible to use a globally
+defined ``path`` function in a ``python:`` expression in ``z3c.pt``:
+
+ >>> template = PageTemplate("""\
+ ... <div xmlns="http://www.w3.org/1999/xhtml">
+ ... <span tal:content="options/test" />
+ ... <span tal:content="python: path('options/test')" />
+ ... </div>""")
+
+ >>> print template(test='test')
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <span>test</span>
+ <span>test</span>
+ </div>
More information about the Checkins
mailing list