----- Original Message ----- From: "Sin Hang Kin" <iekentsin@infoez.com.mo> To: <mj@digicool.com> Cc: "Zope Admin list" <zope@zope.org> Sent: Sunday, March 12, 2000 3:21 AM Subject: Re: [Zope] dtml-var behavior
I am writing a method, which apply to a object and try to wrap the object with some thing, This is
<html><head>....</head> <body><table><tr>...
<dtml-var this> </tr> </table> .... </body> </html>
So to keep all start tags and end tags in the same object.
I can do that for a folder by making the method call index_html and call the index_htm object.
But I want to publish anyobject by adding this method to it:
abc/publish
will warp abc with the apropriate html codes which traditionally in zope is done by header, var, footer. which might result in the opening tags in header and end tags left in footer.
The _.render() method will do what you want: <html><head>....</head> <body><table><tr>... <dtml-var "_.render(this())"> </tr> </table> .... </body> </html> 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 ---------------------------------------------