8 Commits

Author SHA1 Message Date
f32a27dff9 Adiciona campo field_show_in_menu ao content_page
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>
2026-03-24 09:55:26 -03:00
072e64b771 Adiciona field_menu_title e field_weight ao content_page
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>
2026-03-24 07:45:04 -03:00
d2ef439227 Refatora arquitetura de domínio: field_site_section DER, field_parent_page node-only
- 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>
2026-03-20 09:41:17 -03:00
6ab880045a Corrige handler_settings e exclude_entity_types no field_parent_page (PHP 8)
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>
2026-03-18 13:21:53 -03:00
276fd028f2 Add field_redirect_page to site_sections terms and fix root page hierarchy
- 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>
2026-03-05 07:52:49 -03:00
c1274bf3ce Make site section vocabulary configurable and simplify settings form
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>
2026-02-05 13:22:57 -03:00
ba3087e6eb Add content translations for site_sections taxonomy terms
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>
2026-02-05 12:41:02 -03:00
88b9605408 Rename module site_structure → structural_pages and vocabulary site_section → site_sections
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>
2026-02-05 08:10:32 -03:00