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

def CPSSkins::PortalThemesTool::PortalThemesTool::getThemeContainer (   self,
  theme = None,
  parent = None 
)

Gets the themes container.
   - theme = 'printable' | 'default' | ...
   - theme = None : will return the first available theme
   - parent = 1 : returns the 'themes' folder

Definition at line 417 of file PortalThemesTool.py.

00417                                                         :
        """Gets the themes container.
           - theme = 'printable' | 'default' | ...
           - theme = None : will return the first available theme
           - parent = 1 : returns the 'themes' folder
        """

        portal_themes = getToolByName(self, 'portal_themes')
        if parent:
            return portal_themes

        themes = self.objectIds()
        if theme is not None and theme in themes:
            return getattr(portal_themes, theme, None)

        if themes:
            default_theme = self.getDefaultThemeName()
            return getattr(portal_themes, default_theme, None)
        return None

    security.declarePublic('getDefaultThemeName')
    def getDefaultThemeName(self, REQUEST=None):


Generated by  Doxygen 1.6.0   Back to index