ZPT equiv for DTML Command
Ok I have one more question... When setting up a wrapper, the example I'm looking at uses: <dtml-var "_[page_body]" fmt=structured-text> How would this be coded in a ZPT format?
Please see http://www.zope.org/Members/peterbe/DTML2ZPT/examples/example11/view At 18:36 2002-02-02 -0600, Gary Learned wrote:
Ok I have one more question... When setting up a wrapper, the example I'm looking at uses:
<dtml-var "_[page_body]" fmt=structured-text>
How would this be coded in a ZPT format?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Gary Learned writes:
Ok I have one more question... When setting up a wrapper, the example I'm looking at uses:
<dtml-var "_[page_body]" fmt=structured-text> The ZPT mailing list would help you faster...
tal:define=" std modules/Products/PythonScript/standard; st nocall: std/structured_text; page_body python: st(getattr(variable,page_body)); " tal:content="structure page_body" You must "variable" replace by the variable that actually has the "page_body" attribute. ZPT supports less magic, it lacks the DTML namespace. You need to specify which objects provide the attributes. "std" as defined above is a collection of useful function which are often used in DTML for formatting purposes or to implement dtml-var attributes. "nocall" prevents "structured_text" from being called. More info in the TAL/TALES-specification (found via Zope.org). Dieter
participants (3)
-
Dieter Maurer -
Gary Learned -
Peter Bengtsson