def getSkin(self):
        alias = getattr(self, '__alias__', None)

        if alias:
            context = alias
        else:
            context = self.__parent__

        manager = IDynamicViewManager(context)
        return manager.getSkin()
Esempio n. 2
0
    def getSkins(self):
        context = self.context

        # handle aliased objects
        alias = getattr(self.__parent__, '__alias__', None)
        if alias: context = alias

        manager = IDynamicViewManager(context)

        # lookup active skin
        active = manager.getSkin()

        if not active:
            active = 'default'

        # compile list of registered skins for the layout
        skins = manager.getSkins(self.request)

        return [{'id': name,
                 'name': title,
                 'active': name == active} for (name, title) in skins]
Esempio n. 3
0
    def getSkins(self):
        context = self.context

        # handle aliased objects
        alias = getattr(self.__parent__, '__alias__', None)
        if alias:
            context = alias

        manager = IDynamicViewManager(context)

        # lookup active skin
        active = manager.getSkin()

        if not active:
            active = 'default'

        # compile list of registered skins for the layout
        skins = manager.getSkins(self.request)

        return [{
            'id': name,
            'name': title,
            'active': name == active
        } for (name, title) in skins]
Esempio n. 4
0
 def getSkin(self):
     manager = IDynamicViewManager(self.collage_context)
     return manager.getSkin()
Esempio n. 5
0
 def getSkin(self):
     manager = IDynamicViewManager(self.collage_context)
     return manager.getSkin()