[Zope] not to acquire from parent

Service Informatique CHSR chsrinfo@guetali.fr
Fri, 23 Apr 1999 10:18:57 +0400


>Hmm... I'm not sure if this is what your looking for, but if an object
>is not aquired, then it's not wrapped, if it's not wrapped, then it
>doesn't have the attributes aq_base, aq_self, and aq_parent.  So:
>
><!--#if "not object.aq_base"-->
> Then it's not an aquisition wrapped object
>
>This help?

Thanks for your response.
Nope, it doesn't help.

Let me explain this better: My sidebar provide content taken from acquired
tinytable from the toplevel.
This works great, but sometimes, I want to modify the content *only* for a
folder
but not for its subfolders. So, I wanted to test the existence of a
local_tinytable
in the current folder, and if it exists, use it instead of the acquired
tinytable.
I couldn't manage to do this in DTML. I had to write this external method:

def not_acquired(self, objectname):
    self=self.aq_base
    try:
        getattr(self, objectname)
        return 1
    except:
        return None

Note that this external method has to be called from a DTML Method
so that self is the containing Folder.
This works, but I'd like to use as few as possible external methods.

Thanks,
Jephte CLAIN
Service Informatique CHSR