RE: [Zope] Physical path of objects in portal_skins tool of a CMF site
Ok, object is /site_staging/portal_skins/DEFAULT/testpath.html When invoking it using http://myserver/site_staging/testpath.html <http://myserver/site_staging/testpath.html> (so I use CMF skins traversal with implicit skin=default) aq_parent(self).id returns site_staging, which looks ok to me. And getPhysicalPath() will return : '','site_staging','testpath.html' But I really need (for some complicated to explain reasons) to get the full physical path of the object. So something returning : '','site_staging','portal_skins','DEFAULT','testpath.html' portal_skins is a CMF Skins Tool. I am sure it implements ObjectManager, but I don't think it implements Folder. Pascal -----Message d'origine----- De : jens.walte@kk.net [mailto:jens.walte@kk.net] Envoyé : lundi 30 août 2004 16:11 À : Pperegrina@Lastminute.com Cc : zope@zope.org Objet : Re: [Zope] Physical path of objects in portal_skins tool of a CMF site Hi Pascal, the meta_type of "portal_skins" and "DEFAULT" is really 'Folder' ? what returns aq_parent.id on "myobject"? greetz Jens Original Message processed by David InfoCenter Subject: [Zope] Physical path of objects in portal_skins tool of a CMF site (30-Aug-2004 15:56) From: Pperegrina@Lastminute.com <mailto:Pperegrina@Lastminute.com> To: jw@obelix.bb.kk.net <mailto:jw@obelix.bb.kk.net> Hi, I am developping a Zope object that will be used in a CMF site, specially in the portal_skins subfolders. But I can not find out a way to get the physical path of my objects, because getPhysicalPath(), uppon portal_skins traversal, only returns a path down to the CMF site root : all the extra subfolders are omitted... ex : if I put my object in /MyCMFSIte/portal_skins/DEFAULT/myobject getPhysicalPath() returns '','MyCMFSIte','myobject' and I would like to get '','MyCMFSIte','portal_skins','DEFAULT','myobject' Any idea about how to do that ? Thanks. Pascal ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk <http://www.star.net.uk/> ________________________________________________________________________ To: Pperegrina@Lastminute.com Cc: zope@zope.org ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk <http://www.star.net.uk> ________________________________________________________________________ ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Hi! Pascal Peregrina wrote:
Ok, object is /site_staging/portal_skins/DEFAULT/testpath.html
So 'DEFAULT' is a skin layer and 'default' a skin that includes the 'DEFAULT' layer?
When invoking it using http://myserver/site_staging/testpath.html (so I use CMF skins traversal with implicit skin=default) aq_parent(self).id returns site_staging, which looks ok to me. And getPhysicalPath() will return : '','site_staging','testpath.html'
But I really need (for some complicated to explain reasons) to get the full physical path of the object. So something returning : '','site_staging','portal_skins','DEFAULT','testpath.html'
I guess you have no chance. SkinnableObjectManager.__getattr__ removes the original acquisition context from the object. So if you invoke it as attribute of 'site_staging', the object knows nothing about its original context. HTH, Yuppie BTW: There is a CMF list, see <http://mail.zope.org/mailman/listinfo/zope-cmf>
participants (2)
-
Pascal Peregrina -
yuppie