guave / flexiblecontent-bundle
Flexible Content Element for Contao 4.13+
Installs: 1 141
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.13
- guave/visualradio-bundle: ^2.3
- symfony/config: ^5.4
- symfony/dependency-injection: ^5.4
- symfony/http-kernel: ^5.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
README
This contao module adds a Content Element that allows you to choose from different content layouts.
Requirements
- Contao 4.13+
- PHP 7.4 or 8.0+
Install
$ composer require guave/flexiblecontent-bundle
Usage
To change which fields are shown or add a new one, add the template name without ce_
into your config.php
:
$GLOBALS['TL_FLEXIBLE_CONTENT']['templates'] = [ '2col-text', ];
then add a new subpalette for your template in your tl_content.php
, only with the fields you would like to add as your
content:
$GLOBALS['TL_DCA']['tl_content']['subpalettes']['flexibleTemplate_2col-text'] = 'flexibleTitle,flexibleText,flexibleTextColumn';
using the name of your template from $GLOBALS['TL_FLEXIBLE_CONTENT']['templates']
in the
subpalette's flexibleTemplate_<template-name>
key