Use display context to get header settings
authorThierry Florac <thierry.florac@onf.fr>
Thu, 18 Oct 2018 15:07:09 +0200
changeset 185 32037c8b91e4
parent 184 6815147a533f
child 186 a5bff486fe82
Use display context to get header settings
src/pyams_default_theme/viewlet/logo/__init__.py
--- a/src/pyams_default_theme/viewlet/logo/__init__.py	Wed Oct 17 15:27:19 2018 +0200
+++ b/src/pyams_default_theme/viewlet/logo/__init__.py	Thu Oct 18 15:07:09 2018 +0200
@@ -34,7 +34,7 @@
 
     @property
     def settings(self):
-        target = get_parent(self.context, IHeaderTarget)
+        target = get_parent(self.request.display_context, IHeaderTarget)
         settings = IHeaderSettings(target)
         while settings.inherit:
             settings = IHeaderSettings(settings.parent)