--- a/src/pyams_content/features/footer/skin/__init__.py Fri Jun 22 13:03:11 2018 +0200
+++ b/src/pyams_content/features/footer/skin/__init__.py Fri Jun 22 13:03:46 2018 +0200
@@ -19,6 +19,7 @@
from pyams_content.features.footer.interfaces import IFooterTarget, IFooterRenderer, IFooterSettings
from pyams_content.features.renderer.interfaces import HIDDEN_RENDERER_NAME
from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces.url import DISPLAY_CONTEXT
# import packages
from pyams_content.features.renderer.skin import BaseContentRenderer
@@ -35,7 +36,10 @@
def settings(self):
if self.settings_interface is None:
return None
- settings = IFooterSettings(self.context)
+ context = self.request.annotations.get(DISPLAY_CONTEXT)
+ if context is None:
+ context = self.context
+ settings = IFooterSettings(context)
while settings.inherit:
settings = IFooterSettings(settings.parent)
return settings.settings
--- a/src/pyams_content/features/header/skin/__init__.py Fri Jun 22 13:03:11 2018 +0200
+++ b/src/pyams_content/features/header/skin/__init__.py Fri Jun 22 13:03:46 2018 +0200
@@ -19,6 +19,7 @@
from pyams_content.features.header.interfaces import IHeaderTarget, IHeaderRenderer, IHeaderSettings
from pyams_content.features.renderer.interfaces import HIDDEN_RENDERER_NAME
from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces.url import DISPLAY_CONTEXT
# import packages
from pyams_content.features.renderer.skin import BaseContentRenderer
@@ -35,7 +36,10 @@
def settings(self):
if self.settings_interface is None:
return None
- settings = IHeaderSettings(self.context)
+ context = self.request.annotations.get(DISPLAY_CONTEXT)
+ if context is None:
+ context = self.context
+ settings = IHeaderSettings(context)
while settings.inherit:
settings = IHeaderSettings(settings.parent)
return settings.settings