- What is alengo/sulu-content-extra-bundle used for?
- It extends Sulu CMS 3.x Pages, Articles and Snippets with a configurable Additional Data tab and built-in concrete entities, so you can store extra JSON-backed fields without writing project entities. It also maps form fields to localized or unlocalized dimension content and exposes sourceLink and sourceUuid navigation markers for templates. Use it when Sulu content needs structured metadata beyond the standard forms, not as a Laravel package.
- How do I install alengo/sulu-content-extra-bundle in a Sulu CMS project?
- Run composer require alengo/sulu-content-extra-bundle, then register the AlengoContentExtraBundle class in config/bundles.php for all environments. A standard setup needs no further configuration; the bundle auto-registers the Sulu page, article and snippet object configs. You then add or adjust Sulu XML form definitions such as page_additional_data.xml and optional YAML mapping.
- Does alengo/sulu-content-extra-bundle work with Laravel?
- No. It is built for Sulu CMS 3.x on Symfony 7.x and depends on Sulu's mapped-superclass entities and dimensioned content model, so it is not a Laravel package. Laravel developers should use Laravel-native packages or a separate Sulu application. If you are evaluating Composer packages for a Laravel app, this bundle is not compatible.
- Which PHP, Symfony and Sulu versions are required?
- The bundle requires PHP 8.2 or newer, Sulu CMS ^3.0.6 and Symfony 7.x. Sulu 3.0.6 or later is important because it includes Doctrine and Gedmo compatibility fixes for mapped-superclass entities. Avoid downgrading Sulu after installing the bundle because mapped-superclass changes can break the setup.
- How do I configure localized vs unlocalized additional data fields?
- Create config/packages/alengo_content_extra.yaml and declare page, article and snippet sections with form_key plus unlocalized_keys and localized_keys lists. Fields listed in unlocalized_keys are stored in the unlocalized dimension content, while localized_keys go into the localized dimension content. The default form keys are page_additional_data, article_additional_data and snippet_additional_data.
- Do I need to create custom Page, Article or Snippet entities for this bundle?
- No. The bundle ships concrete Page, PageDimensionContent, Article, ArticleDimensionContent, Snippet and SnippetDimensionContent entities extending Sulu's base classes, and it auto-configures sulu_page, sulu_article and sulu_snippet via PrependExtensionInterface. That is why a standard setup requires zero project entities. You still define the Sulu XML forms that describe the additional fields.
- How is the Additional Data tab registered automatically?
- The bundle uses PreviewFormViewBuilder to add the Additional Data tab to Pages, Articles and Snippets, so the admin UI gets the tab without custom view builders in your project. The tab's fields come from your Sulu XML form definitions and the YAML mapping decides localized vs unlocalized storage. This keeps form configuration declarative and inside Sulu's existing form system.
- How do sourceLink and sourceUuid navigation markers work in templates?
- NavigationLinkEnhancer adds sourceLink and sourceUuid markers to link-type pages, and NavigationLinkTypeResolver exposes them through the navlink section for Twig or Symfony templates. You can use these markers for conditional routing, analytics or UI logic when a navigation item points to another content source. Check for variable name conflicts with existing template keys before relying on them.
- What changed in version 1.7.1 for Article and Snippet permissions?
- Release 1.7.1 enforces publish permissions in the Article and Snippet Options tabs, aligning admin behavior with Sulu's publishing permissions. This is a behavior correction rather than a new entity or form integration, but it can affect editors who previously edited options without publish access. After upgrading, validate Sulu role mappings and communicate the change to affected editors.
- What are the production deployment and maintenance concerns?
- Keep auto_generate_proxy_classes false in production and run cache:warmup during deploys, because the bundle uses mapped-superclass Doctrine entities. The bundle does not provide built-in JSON schema validation, so enforce constraints in XML forms or business logic, and budget time for maintaining XML form definitions. For alternatives, compare with custom Sulu entities or simpler JSON metadata approaches; this bundle is a good fit when you want zero-config Additional Data tabs and navigation markers without custom entities.