Adiciona dependências reais do módulo (drupal/core ^11, token, pathauto,
dynamic_entity_reference) e corrige php para >=8.1.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Campo booleano (padrão: ativo) que controla se a página aparece no menu
de navegação. Quando desmarcado, oculta field_menu_title no formulário
via #states e exclui a página da query em getChildPages(). O campo
field_weight permanece sempre visível, pois a ordenação se aplica
independentemente da exibição no menu.
Hook update_10015 cria storage + instância, atualiza o form display e
retroativamente define o valor como 1 para páginas existentes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Registra token do tipo array que resolve o caminho hierárquico completo
de um content_page: domínio (alias de user/term/etc.) + slugs dos nós
pai, do mais distante ao mais próximo. Permite padrão Pathauto como
"[node:content-page-ancestors:join-path]/[node:title]".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reescreve structural-pages-menu.css com layout horizontal como padrão
(análogo ao microsite-nav) e flyout lateral apenas em contexto sidebar.
Extrai renderização de itens para structural-pages-menu-item.html.twig
e adiciona link "Home" apontando para a URL do ancestral.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
field_menu_title (string, 128 chars):
- Título alternativo para exibição no menu de navegação
- Quando preenchido, substitui o título da página no menu
- Útil para abreviar títulos longos
field_weight (integer, padrão 0):
- Controla a ordenação de páginas com o mesmo pai
- Valores menores aparecem primeiro; empate resolvido por título
StructuralPagesMenuBlock:
- Ordenação: field_weight ASC, título ASC (antes: só título)
- Título no menu: field_menu_title se preenchido, senão label()
Update 10014: cria os campos e atualiza o form display em
instalações existentes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tipos de nó que não participam da hierarquia estrutural (ex.: blog_post)
agora delegam para getAncestorFromRoute(), que usa os plugins
ParentEntityHandler registrados para determinar o ancestral.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- field_site_section migrado de entity_reference para dynamic_entity_reference,
permitindo referenciar taxonomy_term, user ou event como domínio raiz da página
- field_parent_page restrito a content_page nodes apenas (removidos taxonomy_term/user)
- Update hooks 10011–10013: migração de schema/config, limpeza de referências
inválidas e correção do tipo do storage field_parent_page para DER
- SectionBreadcrumbBuilder reescrito para usar field_site_section como raiz
- StructuralPagesMenuBlock: queries de domínio via DB direto (evita bug do
entity query com especificador target_type em campos DER)
- Formulário content_page: pre-fill de field_site_section via query params
?domain_type/domain_id ou ?parent_section_type/parent_id; atualiza widget
#default_value diretamente para refletir o valor na renderização inicial
- Parâmetro de URL parent_type renomeado para parent_section_type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adiciona hook_update_10006 que re-sincroniza settings de field_parent_page a
partir do YAML de install, e hook_update_10007 que corrige exclude_entity_types
no storage para FALSE. Ambos evitam TypeError no PHP 8 no widget de referência
dinâmica. Atualiza também o YAML de install com a configuração correta.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add field_redirect_page to site_sections taxonomy terms, with a custom
EntityReferenceSelection plugin that filters content_page nodes by section
- Redirect taxonomy term canonical URLs to the configured node (301)
- Fix root page detection in MenuBlock and views to also match nodes whose
field_parent_page points to a taxonomy_term (not only empty parent)
- Move root taxonomy-term option to the top of the parent-page dropdown
- Add breadcrumb workaround for Gavias notech theme separator rendering
- Add imecc_menu_helper submodule
- Translate config labels and default terms from English to Portuguese
Co-Authored-By: Henrique Bauer <henrique@webcontent.com.br>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Adiciona campo field_redirect_link (link) no bundle content_page;
EventSubscriber emite redirect 301 quando o campo está preenchido
- field_site_section passa a ser obrigatório
- Formulário de content_page: AJAX no site section, select hierárquico
de página pai filtrado por seção, validação customizada
- StructuralPagesMenuBlock: MAX_DEPTH 10→50, nova lógica de raiz via
field_site_section, variável ancestor_url no render array
- Template do menu: novas classes BEM/Gva, suporte a is_redirect,
usa ancestor_url em vez de chamada Twig direta
- CSS do menu reescrito com estilos flyout/sidebar; Select2 adicionado
para o campo de página pai no formulário admin
- display_submitted desabilitado no tipo content_page
Co-Authored-By: Bauer <henrique@webcontent.com.br>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bridge submodule that registers Event entities (from event_management
module) as valid parent types for content_page nodes. Events act as
context containers (clears_site_section: TRUE), similar to users and
groups.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a vocabulary selector to the settings form so the site section
vocabulary is no longer hardcoded. Remove node bundle checkboxes
(section_page/content_page are always included), keep user and group
as configurable parent targets. All hardcoded 'site_sections'
references in PHP replaced with dynamic config reads via helper.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Taxonomy term names are content, not interface strings, so .po files
don't translate them. This adds programmatic content translations via
the ContentLanguageSettings API and addTranslation/setName on each term.
- Add _structural_pages_term_translations() with pt-br name map
- Add _structural_pages_add_term_translations() to create/update translations
- Add _structural_pages_ensure_content_translation() using ContentLanguageSettings API
- Add config/optional for new installs with content_translation enabled
- Remove term name entries from .po file (ineffective for content)
- Add update hook 10004 to fix existing installations
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Renames the module from site_structure to structural_pages and pluralizes
the taxonomy vocabulary machine name from site_section to site_sections,
updating all config, PHP, translations, and documentation references
while preserving field_site_section, clears_site_section, and $site_section_id.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Plugin base class requires the parent constructor to be called
with the id and deriver parameters. This fixes a TypeError in
HookCollectorPass during container compilation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace hardcoded entity type checks with a plugin-based architecture using
PHP 8 attributes. This allows adding new parent entity types without modifying
core module files.
Changes:
- Add ParentEntityHandler attribute, interface, base class, and manager
- Create built-in handlers for taxonomy_term, user, and node entities
- Move Group support to site_structure_group submodule (fixes class not found
error when Group module is not installed)
- Refactor SiteStructureSettingsForm to use handler manager
- Refactor SiteStructureMenuBlock to use handler manager
- Refactor SectionBreadcrumbBuilder to use handler manager
- Update site_structure.module to use handler manager for clearsSiteSection
- Update documentation and translations
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add section describing the dynamic menu block features,
configuration options, and usage instructions. Update file
structure and changelog.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
Drupal module that provides hierarchical site structure management
with support for sections, categories, and content items. Includes
path aliases with tokens, breadcrumb integration, and admin interface.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>