guave / flexibleelement-bundle
Installs: 689
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 0
Type:contao-bundle
Requires
- contao/core-bundle: ^4.4
- guave/visualradio-bundle: ^1.4
README
This contao module adds a Content Element that allows you to use a specific layout.
Requirements
Contao >4 (tested with 4.8)
this library depends on visualradio (https://github.com/guavestudios/contao-visualradio)
Install
composer require guave/flexibleelement-bundle
Usage
- To change which fields are shown or add a new one, add a "templates" array into your
src/Resources/contao/config/config.php
:
<?php $GLOBALS['TL_FLEXIBLEELEMENT']['templates'] = [ [ 'id' => 'flexible-2column-text', 'template' => 'content-elements/ce_2column-text', ], ];
- If you add a new field, add a new subpalette into your
src/Resource/contao/dca/tl_content.php
:
<?php $GLOBALS['TL_DCA']['tl_content']['subpalettes']['elementTemplate_flexible-2column-text'] = 'flexibleTitle,flexibleText,flexibleTextColumn';
using the ID of your $GLOBALS['TL_FLEXIBLEELEMENT']['templates']
in the Subpalette's "elementTemplate_" key