[Zope] The XML-dtml notation "&dtml-variable;"
Andrew
andrew@apl-software.com
4 Nov 1999 16:05:22 -0000
Christopher Petrilli <petrilli@digicool.com> said:
> On 11/4/99 11:31 AM, Michel Pelletier at michel@digicool.com wrote:
>
> > Johan Carlsson wrote:
> >>
> >> 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.
>
> Would something like this be more palatable?
>
> <dtml-var foo default="Empty">
>
How is this different from the following?
<dtml-var foo null="default-value">
Drew