[Zope] dtml-var behavior

Martijn Pieters mj@digicool.com
Sat, 11 Mar 2000 15:59:45 +0100


From: "Sin Hang Kin" <iekentsin@infoez.com.mo>
> I got a quoted version of the object if I made
>
> <dtml-var this>
>
> It does not evaluate the tags and quoted all < with &lt; and so they all
> showed on the browser.
>
> What rules determine when it will be quoted?
>
> Also, I got the same result if I have
>
> <dtml-var "folder.obj">
>
> I can work around with
>
> <dtml-with folder>
> <dtml-var obj>
> </dtml-with>
>
> But how can I workaround "this"?

'this' is an object reference, and it is being stringified. So the source is
returned, HTML quoted.

What do you want to achieve? Calling itself? ot very wise, as it would cause
an infinite loop..

If you want the source, do <dtml-var PricipiaSearchSource> and give the
Document a Proxy Role of Manager.

Martijn Pieters
| Software Engineer    mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope       http://www.zope.org/
|   The Open Source Web Application Server
---------------------------------------------