Ejemplo n.º 1
0
 def test_notify(self):
     for setup in (lambda: None), self.createRootFolder, self.createRFAndSM:
         setup()
     bootStrapSubscriber(EventStub(self.db))
     cx = self.db.open()
     root = cx.root()
     root_folder = root.get(ZopePublication.root_name, None)
     self.assert_(IRootFolder.providedBy(root_folder))
     package_name = '/++etc++site/default'
     package = traverse(root_folder, package_name)
     cx.close()
Ejemplo n.º 2
0
    def configlet_title(self):
        intids = getUtility(IIntIds)

        content = intids.queryObject(self.id)
        if content is None:
            return self.title

        configlet = getUtility(IPortalTabsConfiglet)

        res = []
        parent = content.__parent__
        if ISite.providedBy(content) or \
                parent is None or IRootFolder.providedBy(parent):
            return self.title

        try:
            title = configlet.registered[intids.getId(parent)].configlet_title
        except KeyError:
            title = getattr(parent, 'title', parent.__name__)

        return '/'.join([title, self.title])