[Zope] Changing Properties With ZPT

Sascha Ottolski sascha.ottolski at gallileus.de
Wed Aug 10 13:18:41 EDT 2005


Am Mittwoch, 10. August 2005 16:31 schrieb Dyyryath:
> An example is probably in order. Take the following code:
>
> <div tal:content="template/title">TITLE HERE</div>
> <div tal:content="python:context.title">TITLE HERE</div>

why not using the same name in the python expression? :-)

<div tal:content="python: template.title">TITLE HERE</div>

just beware that the path expression template/title might do some magic for 
you, like calling a method, or accessing a dictionary etc. if in doubt, you 
can always do

<div tal:content="python: path('template/title')">TITLE HERE</div>


cheers, sascha


More information about the Zope mailing list