Skip to content
Snippets Groups Projects
Commit e206da92 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[FEATURE] Allow the override of the highlighted fields in news (TYPO3 is again...

[FEATURE] Allow the override of the highlighted fields in news (TYPO3 is again not handling this at all correctly)
parent db7ad330
No related branches found
No related tags found
No related merge requests found
......@@ -284,6 +284,9 @@ call_user_func(
'label' => $localLangDbPath . $table . '.tx_sgnews_highlighted',
'config' => [
'type' => 'check',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
]
],
],
'tx_sgnews_never_highlighted' => [
......@@ -294,6 +297,9 @@ call_user_func(
'label' => $localLangDbPath . $table . '.tx_sgnews_never_highlighted',
'config' => [
'type' => 'check',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
]
],
],
'tx_sgnews_tags' => [
......@@ -410,38 +416,42 @@ call_user_func(
$GLOBALS['TCA'][$table]['columns'] as $languageExcludeField => $_
) {
if (
!\in_array($languageExcludeField, [
'doktype',
'title',
'subtitle',
'description',
'slug',
'tx_projectbase_path_segment',
'tx_projectbase_excludefromsluggeneration',
'tx_sgnews_location',
'tx_sgnews_teaser1_image',
'tx_sgnews_teaser2_image',
'tx_sgnews_tags',
'abstract',
'tx_projectbase_seo_titletag',
'tx_projectbase_seo_canonicaltag',
'hidden',
'sys_language_uid',
'tx_languagevisibility_visibility',
'lastUpdated',
'tx_sgnews_date_end',
])
!\in_array(
$languageExcludeField, [
'doktype',
'title',
'subtitle',
'description',
'slug',
'tx_projectbase_path_segment',
'tx_projectbase_excludefromsluggeneration',
'tx_sgnews_location',
'tx_sgnews_teaser1_image',
'tx_sgnews_teaser2_image',
'tx_sgnews_tags',
'abstract',
'tx_projectbase_seo_titletag',
'tx_projectbase_seo_canonicaltag',
'hidden',
'sys_language_uid',
'tx_languagevisibility_visibility',
'lastUpdated',
'tx_sgnews_date_end',
'tx_sgnews_highlighted',
'tx_sgnews_never_highlighted',
]
)
) {
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides'][$languageExcludeField]['l10n_mode'] = 'exclude';
}
}
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['title']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.title';
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.title';
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['subtitle']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.subtitle';
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.subtitle';
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['slug']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.slug';
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.slug';
}
}, 'sg_news', 'pages'
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment