From b17a04ea7355cf985c136a78e75420c369616985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 5 Oct 2024 11:41:40 +0200 Subject: [PATCH] Adapt to NavMenuNode In my previous PR, I copied code from https://github.com/phpDocumentor/guides/blob/main/packages/guides/resources/template/html/body/menu/table-of-content.html.twig That template has a different name than the one I copied the code into, so maybe it receives a different type of node? Anyway, I remembered how to actually build the docs and was able to create this version through trial and error rather than blindly copying code. But as you see, I do not fully understand what I am doing, hopefully somebody does. --- templates/guides/body/menu/menu.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/guides/body/menu/menu.html.twig b/templates/guides/body/menu/menu.html.twig index 3bbd3de7..35eaada9 100644 --- a/templates/guides/body/menu/menu.html.twig +++ b/templates/guides/body/menu/menu.html.twig @@ -1,6 +1,6 @@
- {% if node.caption %} -

{{ renderNode(node.caption) }}

+ {% if node.hasOption('caption') %} +

{{ node.getOption('caption') }}

{% endif -%} {% include "body/menu/menu-level.html.twig" %}