From 779be583925b2a7a6ce20095adb94c50f10b87bf Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Wed, 27 Sep 2017 10:49:27 +0200 Subject: [PATCH] adjusted templates to acl setup --- ordr2/resources/__init__.py | 3 +++ ordr2/templates/layout.jinja2 | 17 ++++++++--------- ordr2/views/pages.py | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ordr2/resources/__init__.py b/ordr2/resources/__init__.py index 431f199..3c24dd3 100644 --- a/ordr2/resources/__init__.py +++ b/ordr2/resources/__init__.py @@ -6,6 +6,8 @@ class Root(object): __name__ = None __parent__ = None + nav_highlight = None + def __init__(self, request): self._request = request @@ -13,6 +15,7 @@ class Root(object): return [ (Allow, Everyone, 'view') ] + def includeme(config): ''' Initialize the resources for traversal in a Pyramid app. diff --git a/ordr2/templates/layout.jinja2 b/ordr2/templates/layout.jinja2 index 4476cd5..f2e272c 100644 --- a/ordr2/templates/layout.jinja2 +++ b/ordr2/templates/layout.jinja2 @@ -24,13 +24,12 @@ diff --git a/ordr2/views/pages.py b/ordr2/views/pages.py index d5df102..d05231c 100644 --- a/ordr2/views/pages.py +++ b/ordr2/views/pages.py @@ -18,4 +18,5 @@ def welcome(context, request): renderer='../templates/pages/faq.jinja2' ) def faqs(context, request): + context.nav_highlight = 'faq' return {}