I can see how this would be useful in a situation where I dont have an
instance of self. But in this case I do, so Im not sure how this helps.
I guess you're saying once I have self I can find out what called the
function. More fiddling I guess.
----- Original Message -----
From: "Martijn Pieters" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 12, 2000 11:29 AM
Subject: Re: [Zope-dev] Custom dtml tag
> 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
> > > extend it a bit and for this I would need to get to the calling
> > >
> > > For example, there will be a different query depending upon the object
> > > dtml-query tag is contained in. Does this make sense, does anyone know
> > > 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
> def this(self):
> # Handy way to talk to ourselves in document templates.
> return self
> Martijn Pieters
> | 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 -