PHP code example of heimrichhannot / contao-newspicker-bundle
1. Go to this page and download the library: Download heimrichhannot/contao-newspicker-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/ */
heimrichhannot / contao-newspicker-bundle example snippets
// Single news picker
$GLOBALS['TL_DCA']['fields']['newsSelect'] = [
'label' => &$GLOBALS['TL_LANG']['tl_content']['newsSelect'],
'inputType' => 'newsPicker',
'eval' => [
'tl_class' => 'clr',
'multiple' => false,
],
'sql' => "int(10) unsigned NOT NULL default '0'",
];
// Multiple news picker
$GLOBALS['TL_DCA']['fields']['newsSelect'] = [
'label' => &$GLOBALS['TL_LANG']['tl_content']['newsSelect'],
'inputType' => 'newsPicker',
'eval' => [
'tl_class' => 'clr',
'multiple' => true,
],
'sql' => "blob NULL",
];