ds-site/Configuration/TCA/Overrides/pages.php
Daniel Siepmann 6f1f36aaea Add remaining characters to seo description
That feature is provided by TYPO3.
The feature is triggered by max option.
Even if meta description has no official max length, I use 200 to get a
feeling for actual length as editor.
yoast recommends 120 - 156, see: https://yoast.com/meta-descriptions/
2021-01-22 12:38:40 +01:00

28 lines
859 B
PHP

<?php
(function (string $extensionKey, string $tableName) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
$extensionKey,
'Configuration/PageTSconfig/Index.tsconfig',
$extensionKey
);
$languagePath = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_tca.xlf:' . $tableName . '.';
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
'columns' => [
'lastUpdated' => [
'label' => $languagePath . 'lastUpdated',
'config' => [
'eval' => 'date,int',
],
],
'description' => [
'config' => [
'max' => 200,
],
],
],
]);
})('ds_site', 'pages');