what is the python's 'self' equivalent in dtml?
hi, i'm trying to do recursion in dtml, my first try was <dtml-in "W3.objectValues(['Folder'])"> <a href="<dtml-var id>"><dtml-var title></a><BR> <dtml-let run="_.getattr(_.getattr(???, id), 'recursion'))"> <dtml-var run> </dtml-let> </dtml-in> but i don't know how to say 'self' in dtml (those three question-marks in getattr). can someone help? -dm
Hi, as far as I know it is called "this()" <dtml-var "this().title"> Regards Dirk ----- Original Message ----- From: "Dan Meszaros" <dm@petamem.com> To: <zope@zope.org> Sent: Monday, May 13, 2002 12:42 PM Subject: [Zope] what is the python's 'self' equivalent in dtml?
hi,
i'm trying to do recursion in dtml, my first try was
<dtml-in "W3.objectValues(['Folder'])"> <a href="<dtml-var id>"><dtml-var title></a><BR> <dtml-let run="_.getattr(_.getattr(???, id), 'recursion'))"> <dtml-var run> </dtml-let> </dtml-in>
but i don't know how to say 'self' in dtml (those three question-marks in getattr). can someone help?
-dm
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Dan Meszaros wrote:
hi,
i'm trying to do recursion in dtml, my first try was
<dtml-in "W3.objectValues(['Folder'])"> <a href="<dtml-var id>"><dtml-var title></a><BR> <dtml-let run="_.getattr(_.getattr(???, id), 'recursion'))"> <dtml-var run> </dtml-let> </dtml-in>
but i don't know how to say 'self' in dtml (those three question-marks in getattr). can someone help?
check http://www.zope.org/Documentation/ZopeBook/AppendixB.stx for this() -- ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
participants (3)
-
Dan Meszaros -
Dirk Datzert -
hans