Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalThemesTool::PortalThemesTool::listPalettes (   self,
  category = None,
  object = None 

Gets the list of available palettes for a given object

Definition at line 312 of file PortalThemesTool.py.

00312                                                       :
        """ Gets the list of available palettes for a given object"""

        palette = {}
        title_list = []
        object_list = []
        if object is None:
            return None

        themeroot = self.getPortalThemeRoot(object)
        if themeroot is None:
            return None

        palettes_dir = getattr(themeroot, 'palettes', None)
        if palettes_dir is None:
            return None

        for obj in palettes_dir.objectValues():
            if getattr(aq_base(obj), 'meta_type', None) != category:

        palette['title'] = title_list
        palette['object'] = object_list
        return palette

    def _getTypeInfosHavingActionId(self, id):

Generated by  Doxygen 1.6.0   Back to index