forked from b13/t3ext-seo_basics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
46 lines (37 loc) · 1.46 KB
/
ext_localconf.php
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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// adding th tx_seo_titletag to the pageOverlayFields so it is recognized when fetching the overlay fields
$TYPO3_CONF_VARS['FE']['pageOverlayFields'] .= ',tx_seo_titletag,tx_seo_canonicaltag';
$extconf = unserialize($TYPO3_CONF_VARS['EXT']['extConf']['seo_basics']);
// registering hook for correct indenting of output
if ($extconf['sourceFormatting'] == '1') {
$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output']['tx_seobasics'] = 'EXT:seo_basics/class.tx_seobasics.php:&tx_seobasics->processOutputHook';
}
// registering sitemap.xml for each hierachy of configuration to realurl (meaning to every website in a multisite installation)
if ($extconf['xmlSitemap'] == '1') {
$realurl_hooklist = array(
'encodeSpURL_postProc',
'decodeSpURL_preProc',
'getHost'
);
$realurl = $TYPO3_CONF_VARS['EXTCONF']['realurl'];
if (is_array($realurl)) {
foreach ($realurl as $host => $cnf) {
// we won't do anything with string pointer (e.g. example.org => www.example.org)
if (!is_array($realurl[$host])) {
continue;
}
// exclude realurl hooks from configuration
if (in_array($host, $realurl_hooklist)) {
continue;
}
if (!isset($realurl[$host]['fileName'])) {
$realurl[$host]['fileName'] = array();
}
$realurl[$host]['fileName']['index']['sitemap.xml']['keyValues']['type'] = 776;
}
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = $realurl;
}
}