[ZPT] If/else?
richard@bizarsoftware.com.au
richard@bizarsoftware.com.au
Fri, 11 May 2001 09:15:54 +1000
Guido van Rossum wrote:
>
> > From: richard@bizarsoftware.com.au
> > Here's a thought too...
> >
> > <div tal:condition="python:exists('a/b/c')"
> > tal:replace="a/b/c/d" />
> >
> > ... and
> >
> > <div tal:replace="a/b/c/d | nothing" />
>
> You mean default rather than nothing.
No, unless I'm reading things wrong. The intended behaviour of both is to
replace the tag with "a/b/c/d" if it exists - and nothing if it doesn't.
Are you saying that isn't what I'd get in the second case?
Richard
--
Richard Jones
richard@bizarsoftware.com.au
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)