Skip to content

Commit 61ca0e5

Browse files
committed
[TASK] Composer update
a fix to the menu handling changed the level count in the menues. Adjusting our templates to keep the previous behaviour NodeRenderers had a breaking change
1 parent 5d81383 commit 61ca0e5

File tree

4 files changed

+43
-43
lines changed

4 files changed

+43
-43
lines changed

composer.lock

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/typo3-docs-theme/resources/template/body/menu/sitemap-level.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<li class="toctree-l{{ menuEntry.level }} {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}">
1+
<li class="toctree-l{{ menuEntry.level - 1 }} {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}">
22
<a href="{{ renderLink(menuEntry.url) }}"
33
class="reference internal {%- if entry.url in menu.rootlinePaths %} active {%- endif -%}">
44
{{ renderNode(menuEntry.value.value) }}

packages/typo3-docs-theme/resources/template/structure/navigation/menu-level.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</a>
66

77
{%- if menuEntry.children|length %}
8-
<ul class="menu-level-{{ menuEntry.level }}">
8+
<ul class="menu-level-{{ menuEntry.level - 1 }}">
99
{%- for entry in menuEntry.children -%}
1010
{% include "structure/navigation/menu-level.html.twig" with {
1111
menu: node,

packages/typo3-guides-extension/src/Renderer/NodeRenderer/SinglePageDocumentRenderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class SinglePageDocumentRenderer implements NodeRenderer
1616
public function __construct(
1717
private readonly TemplateRenderer $renderer,
1818
) {}
19-
public function supports(Node $node): bool
19+
public function supports(string $nodeFqcn): bool
2020
{
21-
return $node instanceof DocumentNode;
21+
return DocumentNode::class === $nodeFqcn;
2222
}
2323

2424
public function render(Node $node, RenderContext $renderContext): string

0 commit comments

Comments
 (0)