[Grok-dev] megrok.chameleon template engine
uli at gnufix.de
Tue Feb 24 09:28:57 EST 2009
Sebastian Ware wrote:
> Did I understand it correctly that Chameleon only supports TALES
> python expressions?
`chameleon.zpt` supports TALES python expressions _by default_. Here is
the whole picture:
As far as I can see (could not find complete documentation for all
use-cases) it supports TALES Python expressions,::
TALES string expressions::
<div tal:content="string:Hello" />
and TALES structure expressions::
<div tal:content="structure: view.myval" />
TALES path expressions are _not_ supported currently as far as I can
see. This also applies to TALES ``exists:`` expressions.
For me it is much more convenient to write a Python expression than a
path expression so I do not miss it very much. It was indeed the main
reason for me to write this extension: getting rid of "python:...".
Furthermore you can use the usual suspects like
and, additionally, Genshi-like interpolation inside and outside tags::
which is also very convenient IMHO.
A `megrok.chameleon` specific drawback is, that template changes are not
reloaded automatically on changes. This could be changed but might mean
a remarkable performance decrease.
Hope that helps,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20090224/a4c2a8c5/attachment-0001.bin
More information about the Grok-dev