[Zope] (no subject)

Jay, Dylan djay@lucent.com
Mon, 26 Jun 2000 14:54:12 +1000


> -----Original Message-----
> From: Shalabh Chaturvedi [mailto:shalabh@pspl.co.in]
> Sent: Friday, June 23, 2000 5:19 PM
> To: Jay, Dylan; zope@zope.org
> Subject: Re: [Zope] (no subject)
> 
> 
> Hi:
> 
> Could you give an equivalent using the current dtml tags?

<dtml-if X>
 <a href="a_url">
</dtml-if>
 link text
<dtml-if X>
 </a>
<dtml-else>
 (no link currently available)
</dtml-if>

The annoying things is that X has to be repeated which could be a large
expression. The other option would be 

<dtml-let cache_X="X">
<dtml-if cache_X>
 <a href="a_url">
</dtml-if>
 link text
<dtml-if cache_X>
 </a>
<dtml-else>
 (no link currently available)
</dtml-if>
</dtml-let>

but anyway you look at it its still uglier.

 
> ----- Original Message ----- 
> From: Jay, Dylan <djay@lucent.com>
> To: <zope@zope.org>
> Sent: Friday, June 23, 2000 12:02 PM
> Subject: [Zope] (no subject)
> 
> 
> > Here's a feature I just submitted to the collector.
> > 
> > It seems to me that a few tweaks to the dtml-if syntax 
> would be beneficial
> > 
> > something like the following would certainly clean up some 
> of the logic I
> > end up writing.
> > 
> > <dtml-if X>
> >  <a href="a_url">
> > <dtml-always>
> >  link text
> > <dtml-else>
> >  (no link currently available)
> > <dtml-then>
> >  </a>
> > </dtml-if>
> > 
> > What do people think? I've not implemented it but I 
> wouldn't imagine its
> > very hard.
> > 
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > 
>