[ZPT] Path expression

Tom Deprez Tom Deprez" <tom.deprez@uz.kuleuven.ac.be
Thu, 18 Apr 2002 16:49:49 +0200


Hi,

I've tried every possibility from the Zope Book examples, but I can't get it
to work.

Basicly I need to get a variable out of the namespace and if it doesn't
exists, nothing must happen as in

tal:content="here/myvar | nothing;"

however, myvar is dynamic, does I should use:

tal:content="python:path('here/%s'%myvar')"

but the problem lies in the fact that when myvar doesn't exists in the
namespace, I get an error, which may not happen.

I tried tal:content="python:path('here/%s' % myvar') | nothing", but this
still gives an error when the variable doesn't exist

Is there a way to get this working with a valid path expression?

Thanks in advance,
Tom