From 00c4ec874167f91d793902e3aa3e28dfefd606c3 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Mon, 17 Sep 2018 15:01:57 +0200 Subject: [PATCH] Navigation Links: Pass the slug So we can style the items by comparing it to the page 'title'. --- pillar/web/projects/routes.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pillar/web/projects/routes.py b/pillar/web/projects/routes.py index eb2cbaf8..53e98852 100644 --- a/pillar/web/projects/routes.py +++ b/pillar/web/projects/routes.py @@ -330,7 +330,7 @@ def project_navigation_links(project, api) -> list: }, api=api) if blog: - links.append({'url': finders.find_url_for_node(blog), 'label': blog.name}) + links.append({'url': finders.find_url_for_node(blog), 'label': blog.name, 'slug': 'blog'}) # Fetch pages pages = Node.all({ @@ -343,8 +343,7 @@ def project_navigation_links(project, api) -> list: # Process the results and append the links to the list for p in pages._items: - - links.append({'url': finders.find_url_for_node(p), 'label': p.name}) + links.append({'url': finders.find_url_for_node(p), 'label': p.name, 'slug': p.properties.url}) return links