Skip to content

Instantly share code, notes, and snippets.

@stefansl
Last active June 15, 2018 17:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefansl/9268697 to your computer and use it in GitHub Desktop.
Save stefansl/9268697 to your computer and use it in GitHub Desktop.
Some personal improvements in Contao (/system/config/dcaconfig.php)
// 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