forked from clickstorm/cs_seo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_localconf.php
More file actions
52 lines (41 loc) · 2.15 KB
/
Copy pathext_localconf.php
File metadata and controls
52 lines (41 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
defined('TYPO3') || die();
(function () {
$confArray = \Clickstorm\CsSeo\Utility\ConfigurationUtility::getEmConfiguration();
// Hook into the page module
if (!isset($confArray['inPageModule']) || $confArray['inPageModule'] < 2) {
$hook = ($confArray['inPageModule'] == 1) ? 'drawFooterHook' : 'drawHeaderHook';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php'][$hook]['cs_seo'] =
\Clickstorm\CsSeo\Hook\PageHook::class . '->render';
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['Clickstorm\\CsSeo\\Evaluation\\TCA\\RobotsDisallowAllEvaluator'] = '';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['Clickstorm\\CsSeo\\Evaluation\\TCA\\RobotsExistsEvaluator'] = '';
// new field types
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1524490067] = [
'nodeName' => 'snippetPreview',
'priority' => 30,
'class' => \Clickstorm\CsSeo\Form\Element\SnippetPreview::class,
];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1620117622] = [
'nodeName' => 'txCsseoJsonLd',
'priority' => 30,
'class' => \Clickstorm\CsSeo\Form\Element\JsonLdElement::class,
];
// Register the class to be available in 'eval' of TCA
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['Clickstorm\\CsSeo\\Evaluation\\TCA\\JsonLdEvaluator'] = '';
// add hook to get current cHash params
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getData']['cs_seo'] =
\Clickstorm\CsSeo\Hook\CurrentUrlGetDataHook::class;
// generate and overwrite header data
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags'][] =
\Clickstorm\CsSeo\Hook\MetaTagGeneratorHook::class . '->generate';
// Add module configuration
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(trim('
config.pageTitleProviders {
csSeo {
provider = Clickstorm\CsSeo\PageTitle\CsSeoPageTitleProvider
before = seo
}
}
'));
})();