guave / insertmodulebyalias-bundle
Insert Module by Alias Insert Tag for Contao 4.13+
Installs: 1 622
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^4.13 || ^5.0
- symfony/config: ^5.4 || ^6.4
- symfony/dependency-injection: ^5.4 || ^6.4
- symfony/http-kernel: ^5.4 || ^6.4
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.5
- contao/manager-plugin: ^2.0
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- symfony/phpunit-bridge: ^6.1
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
This package is auto-updated.
Last update: 2024-11-12 07:01:23 UTC
README
This is a utility which lets you reference a module by alias instead of ID. This is important if you have a deployment process with multiple stages, databases and systems that do not ultimately share the same module ids.
The DCA of tl_module is extended by a field "alias".
Requirements
- Contao 4.13+
- PHP 7.4 or 8.0+
Install
$ composer require guave/insertmodulebyalias-bundle
Usage
To load a module you can use the following syntax in your templates:
{{insert_module_alias::modulealias}}
If you need modules for specific languages, add the language to the alias like _en
and then load it in your template
with:
{{insert_module_alias::modulealias_en}}
Since Contao 4.13 you can also create a "Root page dependent Modules" Module. There you can select which module should be loaded for each root page.