Skip to content

Commit

Permalink
[BUGFIX] #111 add page SEO fields after all
Browse files Browse the repository at this point in the history
  • Loading branch information
mhirdes committed Jul 13, 2017
1 parent 6360fad commit 5f4d7d5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
27 changes: 26 additions & 1 deletion Classes/Hook/TableConfigurationPostProcessingHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,32 @@ class TableConfigurationPostProcessingHook implements TableConfigurationPostProc
* @return void
*/
public function processData() {


// add new fields to pages
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'pages',
'--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.seo,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_preview;tx_csseo_preview,tx_csseo_keyword,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_index;tx_csseo_index,
--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.social,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_facebook;tx_csseo_facebook,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_twitter;tx_csseo_twitter',
implode(',',\Clickstorm\CsSeo\Utility\ConfigurationUtility::getEvaluationDoktypes()),
'after:lastUpdated'
);

// add new fields to pages_language_overlay
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'pages_language_overlay',
'--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.seo,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_preview;tx_csseo_preview,tx_csseo_keyword,
--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.social,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_facebook;tx_csseo_facebook,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_twitter;tx_csseo_twitter',
implode(',',\Clickstorm\CsSeo\Utility\ConfigurationUtility::getEvaluationDoktypes()),
'after:lastUpdated'
);

// Extend TCA of records like news etc.
if(isset($GLOBALS['TYPO3_DB'])) {

Expand Down
13 changes: 0 additions & 13 deletions Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,19 +275,6 @@
tx_csseo_tw_image, --linebreak--,
tx_csseo_tw_creator');

// add new fields to types
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'pages',
'--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.seo,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_preview;tx_csseo_preview,tx_csseo_keyword,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_index;tx_csseo_index,
--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.social,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_facebook;tx_csseo_facebook,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_twitter;tx_csseo_twitter',
implode(',',\Clickstorm\CsSeo\Utility\ConfigurationUtility::getEvaluationDoktypes()),
'after:lastUpdated'
);

// add no_index to request update
$GLOBALS['TCA']['pages']['ctrl']['requestUpdate'] .= ',tx_csseo_no_index';

Expand Down
14 changes: 1 addition & 13 deletions Configuration/TCA/Overrides/pages_language_overlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,4 @@
'tx_csseo_twitter',
'tx_csseo_tw_title, --linebreak--,
tx_csseo_tw_description, --linebreak--,
tx_csseo_tw_creator');

// add to types
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'pages_language_overlay',
'--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.seo,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_preview;tx_csseo_preview,tx_csseo_keyword,
--div--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.tab.social,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_facebook;tx_csseo_facebook,
--palette--;LLL:EXT:cs_seo/Resources/Private/Language/locallang_db.xlf:pages.palette.tx_csseo_twitter;tx_csseo_twitter',
implode(',',\Clickstorm\CsSeo\Utility\ConfigurationUtility::getEvaluationDoktypes()),
'after:lastUpdated'
);
tx_csseo_tw_creator');

0 comments on commit 5f4d7d5

Please sign in to comment.