From f84a7209375e57eef5d05d5b42203411055d8337 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Tue, 22 Oct 2024 17:58:38 +0200 Subject: [PATCH] [BUGFIX] Fix menu directive --- .../template/body/menu/menu.html.twig | 8 +++++-- .../tests-full/breadcrumb/expected/index.html | 3 +-- .../tests-full/breadcrumb/expected/page.html | 3 +-- .../breadcrumb/expected/yetAnotherPage.html | 3 +-- ...87616-RemovedHookForAlteringPageLinks.html | 6 ++--- .../expected/Changelog/12.0/Index.html | 6 ++--- .../tests-full/changelog/expected/Index.html | 6 ++--- .../changelog/expected/Sitemap.html | 12 ++++------ .../expected/index.html | 3 +-- .../expected/page1.html | 3 +-- .../main-menu-json/expected/index.html | 3 +-- .../menu-subpages-max-1/expected/index.html | 3 +-- .../expected/index.html | 3 +-- .../expected/index.html | 3 +-- .../menu-subpages/expected/index.html | 22 +++++++++++++++++-- .../tests-full/menu-subpages/input/index.rst | 9 ++++++++ .../expected/anotherPage.html | 3 +-- .../navigation-title/expected/index.html | 3 +-- .../expected/yetAnotherPage.html | 3 +-- .../next-prev-by-toctree/expected/four.html | 3 +-- .../next-prev-by-toctree/expected/i.html | 3 +-- .../next-prev-by-toctree/expected/index.html | 3 +-- .../next-prev-by-toctree/expected/one.html | 3 +-- .../expected/three/index.html | 3 +-- .../expected/three/pi.html | 3 +-- .../expected/three/three.html | 3 +-- .../expected/three/threepointfive.html | 3 +-- .../next-prev-by-toctree/expected/two.html | 3 +-- .../tests-full/next-prev/expected/index.html | 3 +-- .../tests-full/next-prev/expected/page.html | 3 +-- .../next-prev/expected/yetAnotherPage.html | 3 +-- .../page-with-subpages/expected/index.html | 3 +-- .../expected/sub/index.html | 3 +-- .../project-issue-github/expected/index.html | 3 +-- .../report-issue-forge/expected/index.html | 3 +-- .../report-issue-github/expected/index.html | 3 +-- .../report-issue-internal/expected/index.html | 3 +-- .../tests-full/sitemap/expected/Sitemap.html | 6 ++--- .../tests-full/sitemap/expected/index.html | 3 +-- .../sitemap/expected/subpages/subpage1.html | 3 +-- .../two-toctrees/expected/index.html | 6 ++--- 41 files changed, 81 insertions(+), 96 deletions(-) diff --git a/packages/typo3-docs-theme/resources/template/body/menu/menu.html.twig b/packages/typo3-docs-theme/resources/template/body/menu/menu.html.twig index 5a1cc1062..ce1d3a4b1 100644 --- a/packages/typo3-docs-theme/resources/template/body/menu/menu.html.twig +++ b/packages/typo3-docs-theme/resources/template/body/menu/menu.html.twig @@ -1,12 +1,16 @@ - {% if node.options.menu == 'mainmenu' %} {% include "structure/navigation/menu.html.twig" %} {% elseif node.options.menu == 'sitemap' %} {% include "body/menu/sitemap.html.twig" %} {% else %}
+ {% if node.caption -%} +

{{ renderNode(node.caption) }}

+ {% elseif node.options['caption'] -%} +

{{ node.options['caption'] }}

+ {% endif -%} diff --git a/tests/Integration/tests-full/breadcrumb/expected/index.html b/tests/Integration/tests-full/breadcrumb/expected/index.html index f99624cf5..0dcc08063 100644 --- a/tests/Integration/tests-full/breadcrumb/expected/index.html +++ b/tests/Integration/tests-full/breadcrumb/expected/index.html @@ -80,8 +80,7 @@