use request "display_context" property instead of using annotations in header renderer
--- a/src/pyams_default_theme/features/header/skin/__init__.py Wed Jan 30 18:27:13 2019 +0100
+++ b/src/pyams_default_theme/features/header/skin/__init__.py Wed Jan 30 18:29:02 2019 +0100
@@ -37,7 +37,6 @@
from pyams_template.template import template_config
from pyams_utils.adapter import adapter_config
from pyams_utils.interfaces import ICacheKeyValue
-from pyams_utils.interfaces.url import DISPLAY_CONTEXT
from pyams_utils.traversing import get_parent
@@ -91,7 +90,7 @@
def render(self):
# root condition applies only when not displaying a shared content
if ISiteRoot.providedBy(self.request.context) and \
- (self.request.annotations.get(DISPLAY_CONTEXT) is None) and \
+ (self.request.display_context is None) and \
not self.settings.can_apply_on_root:
return ''
# don't use cache in preview mode