On Fri, Jun 23, 2000 at 12:49:16PM +0530, Shalabh Chaturvedi wrote:
> Hi:
> Could you give an equivalent using the current dtml tags?
> From: Jay, Dylan <[EMAIL PROTECTED]>
> > <dtml-if X>
> >  <a href="a_url">
> > <dtml-always>
> >  link text
> > <dtml-else>
> >  (no link currently available)
> > <dtml-then>
> >  </a>
> > </dtml-if>

If I understood it correctly:

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

Or alternatively:

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

Or using Jay's proposal:

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

I don't really think this is an improvement.

As for <dtml-then>, of course it should be </dtml-else>
instead. It's hard to see the point here, and there is no point
at all if there isn't a dtml-always (except for XML
nitpickness); but with dtml-always there _may_ be a point.

<dtml-if X>

This will render either:

when X is true:
 foo bar zoo mar woo far boo
when X is false:
 bar goo mar moo far

So suddenly order starts mattering.

It's a rather convoluted way of achieving this results, but
there may be situations where this is useful. I don't know.

          Hack and Roll  ( http://www.hackandroll.org )
            News for, uh, whatever it is that we are.

http://zope.gf.com.br/lalo           mailto:[EMAIL PROTECTED]
         pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)    ---     http://zope.gf.com.br/BroDar

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to