Add dynamic menu block based on site structure hierarchy

Implements SiteStructureMenuBlock that renders a navigation menu
from the ancestor entity (term, user, or group) through all
content_page hierarchies. Features configurable depth, active
trail highlighting, and proper cache invalidation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 20:13:51 -03:00
parent 8a42a6f1c1
commit a52f564192
6 changed files with 637 additions and 0 deletions

View File

@@ -304,3 +304,35 @@ msgstr "Biblioteca"
msgid "IT Services"
msgstr "Informática"
#: src/Plugin/Block/SiteStructureMenuBlock.php
msgid "Site Structure Menu"
msgstr "Menu da Estrutura do Site"
#: src/Plugin/Block/SiteStructureMenuBlock.php
msgid "Maximum depth"
msgstr "Profundidade máxima"
#: src/Plugin/Block/SiteStructureMenuBlock.php
msgid "Maximum number of levels to display."
msgstr "Número máximo de níveis a exibir."
#: src/Plugin/Block/SiteStructureMenuBlock.php
msgid "Show ancestor title"
msgstr "Exibir título do ancestral"
#: src/Plugin/Block/SiteStructureMenuBlock.php
msgid "Display the ancestor entity title as menu header."
msgstr "Exibir o título da entidade ancestral como cabeçalho do menu."
#: src/Plugin/Block/SiteStructureMenuBlock.php
msgid "Expand active trail"
msgstr "Expandir trilha ativa"
#: src/Plugin/Block/SiteStructureMenuBlock.php
msgid "Automatically expand menu items in the active trail."
msgstr "Expandir automaticamente os itens de menu na trilha ativa."
#: templates/site-structure-menu.html.twig
msgid "Site structure navigation"
msgstr "Navegação da estrutura do site"