[Zope] The XML-dtml notation "&dtml-variable;"

Michel Pelletier michel@digicool.com
Thu, 04 Nov 1999 11:31:57 -0500


Johan Carlsson wrote:
> 
> Hi,
> I just learned about the XML-dtml notation for
> inserting values inside XML-strings.
> 
> I find this useful, and use it both in HTML and XML.
> 
> But, isn't there a way to supply a default value
> (if the variable lookup fails)?
> 
> Something like &dtml-variable default-value;

I think that would be stretching the semantics of <dtml-var> a bit
beyond where they should go.  Just wrap the entity in a <dtml-if> and
test for the variable existence beforehand.  Longer, but much more
clear.

-Michel