From eec8e06e518d68c4d6997769e88d3cd978385c47 Mon Sep 17 00:00:00 2001 From: svanlaere Date: Tue, 30 Jul 2019 13:14:50 +0200 Subject: [PATCH] Navigation: check if folder has content This prevents empty tags for folders without content. --- themes/typemill/partials/navigation.twig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/typemill/partials/navigation.twig b/themes/typemill/partials/navigation.twig index afdec52..8ff0b8b 100644 --- a/themes/typemill/partials/navigation.twig +++ b/themes/typemill/partials/navigation.twig @@ -14,10 +14,12 @@
  • {% endif %} {% if (element.elementType == 'folder') %} - {% if chapnum %}{{ element.chapter }}. {% endif %}{{ element.name }} + {% if chapnum %}{{ element.chapter }}. {% endif %}{{ element.name }} + {% if (element.folderContent|length > 0) %} + {% endif %} {% else %} {% if chapnum %}{{ element.chapter }} {% endif %}{{ element.name }} {% endif %} @@ -29,4 +31,4 @@ \ No newline at end of file +