[ZPT] (newbie) conditional content based on request
Peter Bengtsson
mail@peterbe.com
Mon, 21 May 2001 12:13:54 +0200
Whats the difference between (if exists) and (exists) ?
This (when 'arg' does NOT exist) renders empty (makes sense):
<p tal:condition="(exists) request/arg">
YES</p>
This (when 'arg' does NOT exist) renders '<p>YES</p>' (makes sense):
<p tal:condition="(if exists) request/arg">
YES</p>
the expression: (if exists) and (exists) look pretty darn similar on a
distance.
Perhaps we should all forget this and start using exists: (note the colon)
instead??
Peter
----- Original Message -----
From: "Evan Simpson" <evan@digicool.com>
To: "Thomas Olsen" <thomas@iconmedialab.dk>; <zpt@zope.org>
Sent: Thursday, May 17, 2001 3:15 PM
Subject: Re: [ZPT] (newbie) conditional content based on request
> From: "Thomas Olsen" <thomas@iconmedialab.dk>
> > <p tal:condition="exists:request/arg">
> > Show this if arg exists
> > </p>
>
> This *should* work, but doesn't, due to an over-hasty release on my part.
> You can use "(exists) request/arg" with the current version, though
> "exists:" will be re-enabled in the next release.
>
> Cheers,
>
> Evan @ digicool
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt