Skip to content

Repository files navigation

Visual Radio Bundle

This is a small extension for Contao to display radio buttons with images.

Requirements

  • Contao 5.0+
  • PHP 8.1+

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 webroot
  • eval['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' => ''],
];

About

Visual Radio Field for Contao 4.9+

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages