Commit Graph

8 Commits

Author SHA1 Message Date
eff3c0122f Add structural_pages_event submodule for Event entity support
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>
2026-02-06 07:32:59 -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
c7c8205f1a Rename translation file to follow Drupal module naming convention
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 08:16:03 -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
0c8f0fc778 Implement ParentEntityHandler plugin system for extensible entity support
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>
2026-02-04 08:35:04 -03:00
a52f564192 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>
2026-02-03 20:13:51 -03:00
8a42a6f1c1 Initial commit: Site Structure module for Drupal
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>
2026-02-03 19:55:00 -03:00