Skip to content

Commit

Permalink
Correctly handle the rootfallback palette in Contao 4.9
Browse files Browse the repository at this point in the history
fixes #178
aschempp committed Jul 28, 2020
1 parent b5dff07 commit 3c3513c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ private function handleEditAllMode()
$this->addRegularLanguageFields(
array_diff(
array_keys($GLOBALS['TL_DCA']['tl_page']['palettes']),
['__selector__', 'root', 'folder']
['__selector__', 'root', 'rootfallback', 'folder']
)
);
}
@@ -91,6 +91,13 @@ private function addRootLanguageFields()
->addField('languageRoot', 'fallback')
->applyToPalette('root', 'tl_page')
;

if (isset($GLOBALS['TL_DCA']['tl_page']['palettes']['rootfallback'])) {
PaletteManipulator::create()
->addField('languageRoot', 'fallback')
->applyToPalette('rootfallback', 'tl_page')
;
}
}

/**

0 comments on commit 3c3513c

Please sign in to comment.