[Zope] Newbie: Why doesn't this work?

Chris Withers chrisw@nipltd.com
Tue, 29 Feb 2000 10:33:45 +0000


> <dtml-let x=5 y=7>
>    <dtml-var x><dtml-var y>
> </dtml-let>

What you want is:
<dtml-let x="5" y="7">

because neither 5 nor 7 are Zope objects, putting quotes around them evaluates
them as python expressions, and hence get them treated as numbers. You'll see
this on page 40 of the Zope DTML Guide: <dtml-let ... result="num*index">

> DTML tags push and pop name spaces onto the stack. Some DTML tags,
> like and , do not change the name space at all, but , and modify
> the name space stack in their own way.

I agree, this really needs sorting out, so we can at least find out what the
missing words are! ;-)

> This doesn't give me anything (yes, there are things in a folder below)

Well, when I put this in a dtml-method called 'test' in the root of my Zope
installation, it worked fine and returned a list of the top level objects...
... although it was very slow (I thought zope had hung ;-)

<dtml-in objectValues>
   <dtml-var id>
</dtml-in>

What did it / didn't it do for you?

Chris