PHP code example of heimrichhannot / contao-archive-palettes-bundle
1. Go to this page and download the library: Download heimrichhannot/contao-archive-palettes-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-archive-palettes-bundle example snippets
// ...
$dca['palettes']['custom_palette1'] = '{general_legend},field1,field2;';
$dca['palettes']['custom_palette2'] = '{general_legend},field3,field4;';
System::getContainer()->get(\HeimrichHannot\ArchivePalettesBundle\Manager\ArchivePalettesManager::class)->addArchivePalettesSupportForChild(
'tl_news', 'tl_news_archive'
);
System::getContainer()->get(\HeimrichHannot\ArchivePalettesBundle\Manager\ArchivePalettesManager::class)->addArchivePalettesSupportForArchive(
'tl_news', 'tl_news_archive'
);
// ...
$dca['palettes']['default'] = $dca['palettes']['default'] . ';{archive_palettes_legend},addArchivePalette;';