guave / visualradio-bundle
Visual Radio Field for Contao 4.13+
Installs: 1 786
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.13
- 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 is a small extension for Contao to display radio buttons with images.
Requirements
- Contao 4.13+
- PHP 7.4 or 8.0+
Install
$ composer require guave/visualradio-bundle
Usage
Add the visual radio as a field. Required are the following:
- the templates as an array for options (without
ce_
) eval['imagePath']
is a path within your webrooteval['imageExt']
is the file extension of your images
$GLOBALS['TL_DCA']['tl_content']['fields']['visualradio'] = [ 'inputType' => 'visualradio', 'options' => [ '2col-text', '1col-img' ], 'eval' => [ 'imagePath' => 'files/content-elements/images', 'imageExt' => '.jpg', ], 'sql' => ['type' => 'string', 'length' => 255, 'default' => ''], ];