def render(self): settings = getSettings() self.request.response.setHeader('Content-Type','text/css; charset=utf-8') scheme_css = SCHEMES_CSS[settings.scheme] site = getSite() result = getattr(site, scheme_css) return unicode(result)
def update(self): super(LogoViewlet, self).update() lang = self.portal_state.language() portal = self.portal_state.portal() logoTitle = self.portal_state.portal_title() logoName = 'logo-%s.png' % lang if hasattr(portal, logoName): self.logo_tag = portal.restrictedTraverse(logoName ).tag(title=logoTitle, alt=logoTitle) navroot = self.portal_state.navigation_root() if hasattr(navroot, 'getField'): self.navigation_root_description = navroot.getField( 'description').get(navroot) else: self.navigation_root_description = u'' settings = getSettings() if settings.logo_url.strip(): self.navigation_root_url = settings.logo_url
def available(self): settings = getSettings() if settings.is_subsite: return True return False