srhinow / themecontent-bundle
Manage theme-required content separately from pages in Contao.
Package info
gitlab.com/srhinow/themecontent-bundle
Type:contao-bundle
pkg:composer/srhinow/themecontent-bundle
Requires
- php: >=8.2
- contao/core-bundle: >=5.3
Requires (Dev)
- contao/testing-bundle: ^5.3
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-10 08:27:33 UTC
README
No longer maintained. Since Contao 5.7, content elements can be managed directly on a theme (Layout → Themes → Content elements) and placed in a page layout like a front end module. That covers what this bundle was built for, so it will not be developed further. Existing installations keep working; new projects on Contao 5.7+ should use the core feature instead.
Manage theme-specific content elements (footer, header, etc.) in a dedicated Contao backend section — separate from page trees.
Requirements
| Version | |
|---|---|
| PHP | >= 8.2 |
| Contao | >= 5.3 |
Installation
composer require srhinow/themecontent-bundle
Features
Data structure
Theme Sections (tl_theme_section)
└── Section Articles (tl_theme_section_article)
└── Content Elements (tl_content, ptable = tl_theme_section_article)
Insert tags
| Tag | Description |
|---|---|
{{insert_theme_article::ID\|ALIAS}} | Render a full theme section article |
{{insert_theme_content::ID\|ALIAS}} | Render a single content element from the theme area |
{{insert_content::ID\|ALIAS}} | Standard Contao insert tag also works |
Content element
Add the "Theme Article" content element to embed a specific article from the theme content area via a select field.
Frontend module
Add the "Theme Content / Theme Article" frontend module to embed a theme article either via a page layout or as a content element.
Hook
Override or extend the theme article output via:
$GLOBALS['TL_HOOKS']['compileThemeArticle'][] = [\MyClass::class, 'myMethod'];
The callback receives ($template, $articleData, $moduleObject).
Development
# Run tests
./vendor/bin/phpunit
# Fix code style
./vendor/bin/php-cs-fixer fix