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

def CPSSkins::PortalThemesTool::PortalThemesTool::getPortalThemeRoot (   self,
  object = None 
)

Gets the portal theme root container of a given object 

Definition at line 243 of file PortalThemesTool.py.

00243                                              :
        """ Gets the portal theme root container of a given object """

        if object is None:
            return None
        rurl = object.absolute_url(relative=1)
        path = rurl.split('/')
        path_length = len(path)
        for p in range(0,path_length):
            if path[p] == 'portal_themes' and p < path_length - 1:
                theme_name = path[p+1]
                theme_container = self.getThemeContainer(theme=theme_name)
                return theme_container
        if getattr(object.aq_inner.aq_explicit, 'isportaltheme', 0):
            return object
        return None

    security.declarePublic('getContextObj')
    def getContextObj(self, context=None):


Generated by  Doxygen 1.6.0   Back to index