diff --git a/src/Resources/contao/dca/tl_calendar_events.php b/src/Resources/contao/dca/tl_calendar_events.php index 8971ce0..292f973 100644 --- a/src/Resources/contao/dca/tl_calendar_events.php +++ b/src/Resources/contao/dca/tl_calendar_events.php @@ -1,18 +1,16 @@ addLegend('meilisearch_legend', 'pal_expert_legend', PaletteManipulator::POSITION_AFTER) - ->addField('priority', 'meilisearch_legend') - ->addField('keywords', 'meilisearch_legend') - ->applyToPalette('default', 'tl_calendar_events'); +$dca = &$GLOBALS['TL_DCA']['tl_calendar_events']; + +if (isset($dca['palettes']['default'])) { + PaletteManipulator::create() + ->addLegend('meilisearch_legend', 'pal_expert_legend', PaletteManipulator::POSITION_AFTER) + ->addField('priority', 'meilisearch_legend') + ->addField('keywords', 'meilisearch_legend') + ->applyToPalette('default', 'tl_calendar_events'); +} /** * Priority