From a4a6d7f71127e4e6e5c6a8e03082f5bed9106473 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Wed, 11 Apr 2018 18:03:14 -0700 Subject: [PATCH] Filter sidebar to matching doc_type --- tool/template-sidebar_nav.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tool/template-sidebar_nav.html b/tool/template-sidebar_nav.html index d07d4d04cf..b615aef408 100644 --- a/tool/template-sidebar_nav.html +++ b/tool/template-sidebar_nav.html @@ -1,6 +1,11 @@
{% for cat in categories %} + {% set catpages = pages|selectattr("category", "equalto", cat)|list %} + {% if currentpage.doc_type is defined %} + {% set catpages = catpages|selectattr("doc_type", "equalto", currentpage.doc_type)|list %} + {% endif %} + {% if catpages|length %}