--- a/src/pyams_default_theme/features/header/__init__.py Tue Jul 03 12:18:33 2018 +0200
+++ b/src/pyams_default_theme/features/header/__init__.py Tue Jul 03 14:33:51 2018 +0200
@@ -39,19 +39,21 @@
"""Header content provider"""
header = None
+ renderer = None
def update(self):
parent = get_parent(self.context, IHeaderTarget)
if parent is not None:
- self.header = IHeaderSettings(parent, None)
+ header = self.header = IHeaderSettings(parent, None)
+ if header is not None:
+ renderer = self.renderer = header.get_renderer(self.request)
+ if renderer is not None:
+ renderer.update()
def render(self):
- if self.header is None:
+ if (self.header is None) or (self.renderer is None):
return ''
- renderer = self.header.get_renderer(self.request)
- if renderer is None:
- return ''
- return renderer.render()
+ return self.renderer.render()
#