Re: [Zope] Help me with acquisition and custom types
Mark Gibson wrote at 2005-8-21 12:38 -0600: >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? It will not work as acquisition works differently... You should read Jim's acquisition lecture "Containment before Context". It tells you why acquisition will not do what you like. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help me with acquisition and custom types
On 8/21/05, Mark Gibson <[EMAIL PROTECTED]> 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/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Help me with acquisition and custom types
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? -- Mark Gibson <[EMAIL PROTECTED]> ___ Zope maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )