[ZPT] Python expressions in Paths?

Evan Simpson evan@zope.com
Sun, 12 Aug 2001 13:09:39 -0400


Brad Clements wrote:
> I've found myself needing to use some simple python expressions in paths, but there seems to be no way to express that.
[snip]
> tal:content="item.value+'xyz' | string:No such value"

Ah, but you *can* use paths in a Python expression, like so:

tal:content="python:test(exists('item/value'), item.value+'xyz', 'No 
such value')"

Cheers,

Evan @ Zope