From 67d5b85fd1ea1e270035549e4bf9f59217504a00 Mon Sep 17 00:00:00 2001 From: Jaapio Date: Sun, 26 Oct 2025 11:23:52 +0100 Subject: [PATCH] [TASK] Speed up menu rendering In the original template all files in the documentation contained the full menu structure. While not all was ever used. By rendering just the sub menu's when they are active we do improve the speed of rendering drastically. This results in a 80% performance boost for projects like changelog. --- .../structure/navigation/menu-level.html.twig | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/typo3-docs-theme/resources/template/structure/navigation/menu-level.html.twig b/packages/typo3-docs-theme/resources/template/structure/navigation/menu-level.html.twig index bcf1a2b55..f1f174721 100644 --- a/packages/typo3-docs-theme/resources/template/structure/navigation/menu-level.html.twig +++ b/packages/typo3-docs-theme/resources/template/structure/navigation/menu-level.html.twig @@ -1,3 +1,4 @@ +{%- if menu.currentPath == entry.url or entry.url in menu.rootlinePaths %} +{%- else -%} +
  • + + {{ renderPlainText(menuEntry.value) }} + + + {%- if menuEntry.children|length and menuEntry.level < 2 %} + + {%- endif -%} +
  • +{%- endif -%}