From 88254d7734c6ea102af8d26383f94229366d262c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zaj=C4=85czkowski?= Date: Wed, 19 Feb 2020 00:49:34 +0100 Subject: [PATCH] Do not display empty series and categories in sidebar --- layouts/partials/taxonomy/taxonomy-categories.html | 2 +- layouts/partials/taxonomy/taxonomy-series.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/taxonomy/taxonomy-categories.html b/layouts/partials/taxonomy/taxonomy-categories.html index d6d0b9d..6565e45 100644 --- a/layouts/partials/taxonomy/taxonomy-categories.html +++ b/layouts/partials/taxonomy/taxonomy-categories.html @@ -1,4 +1,4 @@ -{{ if $.Param "enableSidebarCategories" }} +{{ if and ($.Param "enableSidebarCategories") (ne (len .Site.Taxonomies.categories) 0) }}
diff --git a/layouts/partials/taxonomy/taxonomy-series.html b/layouts/partials/taxonomy/taxonomy-series.html index 0fde46a..dd64db4 100644 --- a/layouts/partials/taxonomy/taxonomy-series.html +++ b/layouts/partials/taxonomy/taxonomy-series.html @@ -1,4 +1,4 @@ -{{ if $.Param "enableSidebarSeries" }} +{{ if and ($.Param "enableSidebarSeries") (ne (len .Site.Taxonomies.series) 0) }}
@@ -22,4 +22,4 @@ {{ end }}
-{{ end }} \ No newline at end of file +{{ end }}