Fw: [ZPT] TAL Exists: type
Todd Coram
todd@digicool.com
Wed, 21 Mar 2001 10:44:33 -0500
----- Original Message -----
From: "Evan Simpson" <evan@digicool.com>
To: "Todd Coram" <todd@digicool.com>
Sent: Wednesday, March 21, 2001 10:22 AM
Subject: Re: [ZPT] TAL Exists: type
> From: "Todd Coram" <todd@digicool.com>
> > Any stories to tell on the undocumented TAL type of "exists:"? I
briefly
> > remember this type, but can't remember concisely where it is applicable.
> > Any use cases to offer?
>
> Something like:
>
> <p tal:condition="exists:here/legal_notice"
> tal:content="here/legal_notice">Blather</p>
>
> This also highlights my reason for suspecting that an Undefined singleton
> could be very useful; If the path were longer, and appeared more than
> twice, this would become painfully verbose and error-prone, or would need
to
> be split into two tags:
>
> <div tal:condition="exists:here/to/there/via/another/place">
> <p tal:define="x here/to/there/via/another/place"
> tal:condition="x/hasBlarg" tal:content="x">Bother</p>
> </div>
>
> ...as opposed to:
>
> <p tal:define="x here/to/there/via/another/place; blargness x/hasBlarg"
> tal:condition="blargness" tal:content="x">Bother</p>
>
> This assumes that any attempt to traverse Undefined returns Undefined.
>
> Cheers,
>
> Evan @ digicool
>
>
>