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 %}