From a5693d54ef91f7a22b674b8848bbd4b4dfa10713 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Sat, 23 Feb 2019 10:40:03 +0100 Subject: [PATCH] Provide a proper unique id and a review state class for the first level tabs Fixes #184 --- news/184.bugfix | 2 ++ plone/app/layout/navigation/navtree.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 news/184.bugfix diff --git a/news/184.bugfix b/news/184.bugfix new file mode 100644 index 00000000..940cdd3c --- /dev/null +++ b/news/184.bugfix @@ -0,0 +1,2 @@ +Provide a proper unique id and a review state class for the first level tabs +[ale-rt] diff --git a/plone/app/layout/navigation/navtree.py b/plone/app/layout/navigation/navtree.py index bdce29b0..f6606d2d 100644 --- a/plone/app/layout/navigation/navtree.py +++ b/plone/app/layout/navigation/navtree.py @@ -376,7 +376,6 @@ class NavTreeProvider(ContentProviderBase): ) _item_markup_template = ( u'
  • ' - u'{opener}' u'{title}{opener}' # noqa: E 501 u'{sub}' u'
  • ' @@ -426,9 +425,10 @@ def navtree(self): entry = tab.copy() entry.update({ 'path': '/'.join((navtree_path, tab['id'])), - 'uid': None, - 'review_state': None, + 'uid': tab['id'], }) + if 'review_state' not in entry: + entry['review_state'] = None if 'title' not in entry: entry['title'] = ( tab.get('name')