oneup / contao-custom-collection-bundle
Installs: 107
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Type:contao-bundle
Requires
- php: >=5.5
- contao/core-bundle: ^4.2
This package is not auto-updated.
Last update: 2020-01-21 05:18:09 UTC
README
Use
- Extend the
tl_custom_collection.php
table by adding a custom subpalette for each collection. The name must correspond totype_<collection_archive>
, whereas collection_archive is the name of your collection archive in snake case. E.g. for an archive called "Example Collection":$GLOBALS['TL_DCA']['tl_custom_collection']['subpalettes']['type_example_collection'] = ';{image_legend},addImage;{text_legend},text;';
You can thereby chose from numerous predefined fields, or, add your custom fields to thefields
array, e.g.:$GLOBALS['TL_DCA']['tl_custom_collection']['fields']['exampleTextField'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_custom_collection']['exampleTextField'], 'exclude' => true, 'search' => true, 'sorting' => true, 'inputType' => 'text', 'eval' => array('mandatory'=>false, 'maxlength'=>255), 'sql' => "varchar(255) NOT NULL default ''" ];
- After install and DB update, create a custom collection archive in the Contao Backend and start adding items to your collection.