From: "Chris McDonough" <[EMAIL PROTECTED]> > Hmm... no, I dont think there's a call to get the virtual root. > Although I imagine it would be pretty simple to add.
Yes it is. This works with SiteAccessEnhanced (where EASY_VHM has to be the name if the host monster) security.declarePublic('getVirtualRootPath') def getVirtualRootPath(self): req = self.REQUEST rpp = req.get('VirtualRootPhysicalPath', None) if rpp is None: vhm = getattr(self, EASY_VHM, None) if vhm is None: return ('',) else: rules = vhm.display_rules() physical_path = self.getPhysicalPath() best_match = ('',) for domain,path in rules: match_path = path = split(path,'/') if len(path)<=len(physical_path): index = 0 for pid in path: if physical_path[index]!=pid: match_path = None break index = index + 1 if match_path != None: if len(match_path) > len(best_match): best_match = match_path return tuple(best_match) return rpp And when you have the path you can get the object. _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )