Last active
June 15, 2018 17:31
-
-
Save stefansl/9268697 to your computer and use it in GitHub Desktop.
Some personal improvements in Contao (/system/config/dcaconfig.php)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reihenfolge der Headline-Typen ändern | |
$GLOBALS['TL_DCA']['tl_content']['fields']['headline']['options']= array('h2', 'h3', 'h4', 'h5', 'h6', 'h1'); | |
// Artikel und Seiten standardmäßig auf 'veröffentlicht' stellen | |
$GLOBALS['TL_DCA']['tl_article']['fields']['published']['default'] = true; | |
$GLOBALS['TL_DCA']['tl_page']['fields']['published']['default'] = true; | |
// HTML in Überschriften erlauben | |
$GLOBALS['TL_DCA']['tl_content']['fields']['headline']['eval']['allowHtml'] = true; | |
// Standard Content-Element auf 'Headline' ändern | |
$GLOBALS['TL_DCA']['tl_content']['fields']['type']['default'] = 'headline'; | |
// Seiten-ID anzeigen | |
$GLOBALS['TL_DCA']['tl_page']['list']['label']['fields'][] = 'id'; | |
$GLOBALS['TL_DCA']['tl_page']['list']['label']['format'] = '%s <span style="color: #bbb; padding-left: 3px; font-size: 0.9em;">(%s.html ID: %s)</span>'; | |
// Artikel-ID anzeigen | |
$GLOBALS['TL_DCA']['tl_article']['list']['label']['fields'][] = 'id'; | |
$GLOBALS['TL_DCA']['tl_article']['list']['label']['format'] = '%s <span style="color: #bbb; padding-left: 3px; font-size: 0.9em;">(%s.html, ID: %s)</span>'; | |
// Deaktivieren der Update-Anzeige für Nicht-Admins | |
if (!\BackendUser::getInstance()->isAdmin) { | |
foreach ((array) $GLOBALS['TL_HOOKS']['getSystemMessages'] as $k => $arrHook) { | |
if ($arrHook[1] == 'versionCheck') { | |
unset($GLOBALS['TL_HOOKS']['getSystemMessages'][$k]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment