[Zope] Help me with acquisition and custom types

Lennart Regebro regebro at gmail.com
Mon Aug 22 05:43:53 EDT 2005


On 8/21/05, Mark Gibson <mark at kaivo.com> wrote:
> I've got a problem...
>
> I've created two objects, A folderish object called myfolder, and a
> document-type object called mydocument.  Here's how my classes are
> defined...
>
> class mydocument(
>            CatalogAware,
>            Implicit,
>            Persistent,
>            RoleManager,
>            PropertyManager,
>            Item):
> class myfolder(
>            CatalogAware,
>            Implicit,
>            Persistent,
>            RoleManager,
>            PropertyManager,
>            Folder)
>
> So, say I have a hierarchy like this...
>
> /
> /ObjectA
> /folder
> /folder/mydocument ( an instance of mydocument)
> /folder/myfolder (an instance of myfolder)
> /folder/myfolder/ObjectA
>
> Ok.. I want to be able to call
>
> http://mysite/folder/mydocument/ObjectA
>   - this works fine
> http://mysite/folder/myfolder/ObjectA
>  - this works fine
> http://mysite/folder/myfolder/mydocument/ObjectA
>  - this returns the ObjectA at '/ObjectA', I'd like it to return ObjectA
> at '/folder/myfolder/ObjectA'
>
> Any ideas how I would go about making this happen?

Not without making your product "manually" do serious acquisition magic.
But there might be an easier way. Could you tell us what you are
trying to achieve?

--
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the Zope mailing list