On Tue, Sep 12, 2000 at 09:26:49AM -0700, Andy McKay wrote:
> Hmm well ive found i have <TemplateDict> object and of course my self.
> Perhaps there is a pythonism I have to research here.
> ----- Original Message -----
> From: "Andy McKay" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 11, 2000 4:03 PM
> Subject: [Zope-dev] Custom dtml tag
> > Im playing with a custom dtml-tag along the lines of <dtm-query foo>
> > constructs a url to a catalog query. It works fine, I would just like to
> > extend it a bit and for this I would need to get to the calling object.
> > For example, there will be a different query depending upon the object the
> > dtml-query tag is contained in. Does this make sense, does anyone know the
> > answer?
> > Thanks in advance.
> > --
> > Andy McKay, Developer.
> > ActiveState.
The namespace just reflects the attributes of the current object, plus
whatever other tags push onto that stack (such as the in tag, which pushes
the current element of the list it iterates over on top).
If you retrieve the 'this' method from the stack, and call it, it'll
return the topmost object on the stack. It is implemented in
# Handy way to talk to ourselves in document templates.
| Software Engineer mailto:[EMAIL PROTECTED]
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -