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

def CPSSkins::PortalTheme::PortalTheme::renderCSS (   self,

Generates the CSS file for this theme 

Definition at line 286 of file PortalTheme.py.

00286                              :
        """ Generates the CSS file for this theme """

        REQUEST = self.REQUEST

        self.setCacheHeaders(content_type='text/css', **kw)

        cache = self.getCSSCache()
        index = tuple(kw.items())

        cleanup_date = getattr(self, 'css_cache_cleanup_date', 0)
        last_update = cache.getLastUpdate()
        if last_update < cleanup_date:

        css = cache.getEntry(index)

        if css is None:
            styles_dir = self.getStylesFolder()
            if styles_dir is None:
                return None
            css = ''
            for obj in styles_dir.objectValues():
                if getattr(aq_base(obj), 'isportalstyle', 0):
                    css += obj.render(**kw)
            css = css_slimmer(css)
            cache.setEntry(index, css)
        return css

    def renderJS(self, REQUEST=None, **kw):

Generated by  Doxygen 1.6.0   Back to index