PHP code example of oneup / contao-custom-collection-bundle

1. Go to this page and download the library: Download oneup/contao-custom-collection-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oneup / contao-custom-collection-bundle example snippets


   $GLOBALS['TL_DCA']['tl_custom_collection']['subpalettes']['type_example_collection'] = ';{image_legend},addImage;{text_legend},text;';
   

   $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 ''"
   ];