Use display context when looking for header settings source
authorThierry Florac <thierry.florac@onf.fr>
Thu, 18 Oct 2018 14:22:59 +0200
changeset 1025 dc64989a9283
parent 1024 cbc4b53f6dd2
child 1026 2bc20b979c84
Use display context when looking for header settings source
src/pyams_content/features/header/skin/__init__.py
--- a/src/pyams_content/features/header/skin/__init__.py	Wed Oct 17 17:40:29 2018 +0200
+++ b/src/pyams_content/features/header/skin/__init__.py	Thu Oct 18 14:22:59 2018 +0200
@@ -24,7 +24,6 @@
 from pyams_portal.interfaces import PREVIEW_MODE
 from pyams_skin.layer import IPyAMSLayer
 from pyams_utils.interfaces import ICacheKeyValue
-from pyams_utils.interfaces.url import DISPLAY_CONTEXT
 
 # import packages
 from pyams_cache.beaker import get_cache
@@ -47,7 +46,7 @@
 
     @reify
     def settings_target(self):
-        context = self.request.annotations.get(DISPLAY_CONTEXT)
+        context = self.request.display_context
         if context is None:
             context = self.context
         return get_parent(context, IHeaderTarget)