-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathext_localconf.php
85 lines (77 loc) · 3.69 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
if (!defined('TYPO3')) {
die('Access denied.');
}
//Register cache
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_bgmhreflang_cache']) || !is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_bgmhreflang_cache'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_bgmhreflang_cache'] = [];
}
//Clear cache whene page cache is cleared
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_bgmhreflang_cache']['groups'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_bgmhreflang_cache']['groups'] = ['pages'];
}
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1603836773] = [
'nodeName' => 'bgmhreflangList',
'priority' => 40,
'class' => \BGM\BgmHreflang\Form\Element\HreflangTagsElement::class,
];
//Register old and new related pages for cache clearing after changes in the backend
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \BGM\BgmHreflang\Hooks\DataHandler::class;
//Cache is cleared in frontend for all related pages if no cache entry for the current page has been found.
//Here you can disable this behaviour, if you are sure the new DataHandler backend hook is enough cache clearing.
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['bgm_hreflang']['feature']['clearCacheInFrontent'] = true;
/**
* DEMO CONFIGURATION
*/
/*
//"sys_language_uid" and "isolanguagecode" have to be unique in the array $languageMapping!
$languageMapping = array(
//sys_language_uid => isolanguagecode,
1 => 'de', //Deutsch
2 => 'en', //Englisch
3 => 'fr', //Französisch
);
//"pageid" is the rootpage of a country tree. It has to be unique in the array $countryMapping!
//"isocountrycode" has to be unique in the array $countryMapping!
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['bgm_hreflang']['countryMapping'] = array(
pageid => array(
'countryCode' => isocountrycode,
//"$languageMapping + array(0 => isolanguagecode)" can be assigned more than once with the same isolanguagecode as languageMapping in the array countryMapping.
'languageMapping' => $languageMapping + array(0 => isolanguagecode),
//"additionalGetParameters" is optional
'additionalGetParameters' => array(
//"sys_language_uid" has to be unique in the array $additionalGetParameters!
sys_language_uid => isolanguagecode,
),
//domainName is optional
'domainName' => 'https://www.domain.tld',
//"additionalCountries" is optional
'additionalCountries' => array(isocountrycode2, isocountrycode3),
),
12 => array( //International
'countryCode' => 'en',
'languageMapping' => $languageMapping + array(0 => 'en'),
'additionalGetParameters' => array(
1 => '&foo=bar',
),
'domainName' => 'https://www.my-domain.com',
),
34 => array( //Deutschland
'countryCode' => 'de',
'languageMapping' => $languageMapping + array(0 => 'de'),
'additionalCountries' => array('at', 'ch'),
'domainName' => 'https://www.my-domain.de',
),
56 => array( //UK
'countryCode' => 'gb',
'languageMapping' => $languageMapping + array(0 => 'en'),
'domainName' => 'https://www.my-domain.co.uk',
),
78 => array( //France
'countryCode' => 'fr',
'languageMapping' => $languageMapping + array(0 => 'fr'),
),
);
//If L==0, pages in this tree are rendered with 'x-default', else only the isolanguagecode is used (without the isocountrycode)
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['bgm_hreflang']['defaultCountryId'] = 12;
*/