menatwork / contao-multicolumnwizard-bundle
MultiColumWizard for Contao OpenSource CMS
Installs: 276 256
Dependents: 147
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 13
Type:contao-bundle
Requires
- php: ^8.1
- ext-json: *
- contao/core-bundle: ^4.13 || ^5.0
- symfony/config: ^5.4 || ^6.0
- symfony/console: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/event-dispatcher: ^5.4 || ^6.0
- symfony/http-foundation: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/translation: ^5.4 || ^6.0
Requires (Dev)
- contao-community-alliance/dc-general: ^2.3
- contao/manager-plugin: ^2.1
- phpcq/runner-bootstrap: ^1.0@dev
- roave/security-advisories: dev-latest
Replaces
- contao-legacy/multicolumnwizard: *
- menatwork/contao-multicolumnwizard: >=3.3.4 <4.0
- dev-develop / 3.7.x-dev
- dev-master / 3.6.x-dev
- 3.6.9
- 3.6.8
- 3.6.7
- 3.6.6
- 3.6.5
- 3.6.4
- 3.6.3
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.9
- 3.5.8
- 3.5.7
- 3.5.6
- 3.5.5
- 3.5.4
- 3.5.3
- 3.5.2
- 3.5.0
- 3.4.11
- 3.4.10
- 3.4.9
- 3.4.8
- 3.4.7
- 3.4.6
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.4.0-beta9
- 3.4.0-beta8
- 3.4.0-beta7
- 3.4.0-beta6
- 3.4.0-beta5
- 3.4.0-beta4
- 3.4.0-beta3
- 3.4.0-beta2
- 3.4.0-beta1
- dev-hotfix/fix_php8_warning
- dev-hotfix/fix_tlmode_c5
- dev-hotfix/dcg_support
- dev-hotfix/3.6.6
- dev-hotfix/3.6.3
- dev-hotfix/3.6.2
- dev-feature/contao-5-support
- dev-hotfix/update_symfony
- dev-hotfix/3.4.13
- dev-support/contao4.4
- dev-hotfix/field_wizard_callback
- dev-features/twig
- dev-hotfix/add_form_option_labels
- dev-features/copy
- dev-release/features
- dev-release/js-opti
- dev-support/contao3
This package is auto-updated.
Last update: 2024-11-26 00:12:17 UTC
README
The repository of contao-multicolumnwizard-bundle was moved to contao-community-alliance. We plan to support this version with bugfixes until the new version from the CCA is released.
MultiColumnWizard
The MultiColumnWizard is a widget for mapping several fields of the same and/or different type (input type) in a DCA element. The individual fields of the MCW are listed column by column in the backend and can be extended row by row as a group. The arrangement corresponds to a multidimensional array of the form array[rows][fields], which is stored in the database as a serialized array. The widget is almost identical to MultiTextWizard or MultiSelectWizard. It extends the functionality of any widget.
More information can be found in the contao wiki http://de.contaowiki.org/MultiColumnWizard
Install
The Multicolumnwizard is usually installed via an extension. If it is necessary to install Multicolumnwizard yourself, please use the console with the composer via the call
composer require menatwork/contao-multicolumnwizard-bundle
or
web/contao-manager.phar.php composer require menatwork/contao-multicolumnwizard-bundle
Developers should add the Multicolumnwizard to their composer.json
as a dependent package.
Usages
Usage with columnFields
<?php $GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => [ 'columnFields' => [ 'ts_client_os' => [ 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_os'], 'exclude' => true, 'inputType' => 'select', 'eval' => [ 'style' => 'width:250px', 'includeBlankOption' => true, ], 'options' => [ 'option1' => 'Option 1', 'option2' => 'Option 2', ], ], 'ts_client_browser' => [ 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'], 'exclude' => true, 'inputType' => 'text', 'eval' => [ 'style' => 'width:180px' ], ], ], ], 'sql' => 'blob NULL', ]; ?>
Usage with callback
<?php $GLOBALS['TL_DCA']['tl_table']['fields']['anything'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_table']['anything'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => [ 'mandatory' => true, 'columnsCallback' => [ 'Class', 'Method' ], ], 'sql' => 'blob NULL', ]; ?>
Disable Drag and Drop
<?php $GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => [ // add this line for use the up and down arrows 'dragAndDrop' => false, 'columnFields' => [ 'ts_client_browser' => [ 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'], 'exclude' => true, 'inputType' => 'text', 'eval' => [ 'style' => 'width:180px' ], ], ], ], 'sql' => 'blob NULL', ]; ?>
Hide buttons
<?php $GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => [ // add this line for hide one or all buttons 'buttons' => [ 'new' => false, 'copy' => false, 'delete' => false, 'up' => false, 'down' => false, 'move' => false ], // as alternative to hide all buttons use the next line //'hideButtons' => true, 'columnFields' => [ 'ts_client_browser' => [ 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'], 'exclude' => true, 'inputType' => 'text', 'eval' => [ 'style' => 'width:180px' ], ], ], ], 'sql' => 'blob NULL', ]; ?>
Other parameters
From version 3.6.5:
The Symfony translator can be used to translate the label and description. To do this, set the useTranslator
key to true.
<?php $GLOBALS['TL_DCA']['tl_theme']['fields']['anything'] = [ //... 'inputType' => 'multiColumnWizard', 'eval' => [ 'useTranslator' => true, // ... ], ]; ?>
The descriptions of the columns are displayed in the column header as a tooltip next to the icon 🛈
- the
character or text can be changed in the language file.