From 7b4a270078894088e93113571886889e18449649 Mon Sep 17 00:00:00 2001 From: Daniel Hladek Date: Sat, 3 Oct 2020 10:53:23 +0200 Subject: [PATCH] zz --- themes/mytheme/templates/partials/sidebar.html.twig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/themes/mytheme/templates/partials/sidebar.html.twig b/themes/mytheme/templates/partials/sidebar.html.twig index 77ffa51d..15466c62 100644 --- a/themes/mytheme/templates/partials/sidebar.html.twig +++ b/themes/mytheme/templates/partials/sidebar.html.twig @@ -11,10 +11,12 @@ {% if config.get('plugins.page-toc.active') or attribute(page.header, 'page-toc').active %}
- {% set table_of_contents = toc(page.content) %} - {% if table_of_contents is not empty %} -

Obsah

- {{ table_of_contents }} + {% if page.content is not empty %} + {% set table_of_contents = toc(page.content) %} + {% if table_of_contents is not empty %} +

Obsah

+ {{ table_of_contents }} + {% endif %} {% endif %}
{% endif %}