RealurlConfiguration.php 5.96 KB
Newer Older
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
<?php

$TYPO3_CONF_VARS['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment';

function user_getPreProc_Rewrites()
{
    return $rewrite = [
    ];
}

function user_encodeSpURL_postProc(&$params, &$ref)
{
    $rewrite = user_getPreProc_Rewrites();
    $search = array_keys($rewrite);
    $replace = array_values($rewrite);
    $params['URL'] = str_replace($search, $replace, $params['URL']);
}

function user_decodeSpURL_preProc(&$params, &$ref)
{
    $rewrite = user_getPreProc_Rewrites();
    $search = array_values($rewrite);
    $replace = array_keys($rewrite);
    $params['URL'] = str_replace($search, $replace, $params['URL']);
}

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = [
    'encodeSpURL_postProc' => ['user_encodeSpURL_postProc'],
    'decodeSpURL_preProc' => ['user_decodeSpURL_preProc'],
];

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = [
    'cache' => [
        //'banUrlsRegExp' => '',
        //'disable' => FALSE,
    ],
    'init' => [
        'appendMissingSlash' => 'ifNotFile,redirect[301]',
        //'emptySegmentValue'      => '',
        //'emptyUrlReturnValue'    => '',
        'postVarSet_failureMode' => '',
        //'reapplyAbsRefPrefix'    => 0,
    ],
    'fileName' => [
        'acceptHTMLsuffix' => false,
        'defaultToHTMLsuffixOnPrev' => false,
        'index' => [
        ],
    ],
    'pagePath' => [
        'expireDays' => 2,
        'languageExceptionUids' => '',
        'languageGetVar' => 'L',
        'rootpage_id' => 1,
        'spaceCharacter' => '-',
    ],

    'preVars' => [
        [
            'GETvar' => 'no_cache',
            'valueMap' => [
                'nc' => 1,
            ],
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'L',
            'valueMap' => [
//                'de' => 1, /* @todo: configure me for the system languages */
            ],
            'noMatch' => 'bypass',
        ],
    ],
    'fixedPostVars' => [
75
        // ext:news
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
        'newsDetailConfiguration' => [
            [
                'GETvar' => 'tx_news_pi1[action]',
                'valueMap' => [
                    'detail' => '',
                ],
                'noMatch' => 'bypass'
            ],
            [
                'GETvar' => 'tx_news_pi1[controller]',
                'valueMap' => [
                    'News' => '',
                ],
                'noMatch' => 'bypass'
            ],
            [
                'GETvar' => 'tx_news_pi1[news]',
                'lookUpTable' => [
                    'table' => 'tx_news_domain_model_news',
                    'id_field' => 'uid',
                    'alias_field' => 'title',
                    'addWhereClause' => ' AND NOT deleted',
                    'useUniqueCache' => 1,
                    'useUniqueCache_conf' => [
                        'strtolower' => 1,
                        'spaceCharacter' => '-'
                    ],
                    'languageGetVar' => 'L',
                    'languageExceptionUids' => '',
                    'languageField' => 'sys_language_uid',
                    'transOrigPointerField' => 'l10n_parent',
                    'expireDays' => 180,
                ],
            ],
        ],
        '185' => 'newsDetailConfiguration',
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
        // certification listing
        'certificationListingLetterPage' => [
            [
                'GETvar' => 'tx_certifications_certlist[action]',
                'valueMap' => [
                    'list' => '',
                ],
                'noMatch' => 'bypass'
            ],
            [
                'GETvar' => 'tx_certifications_certlist[controller]',
                'valueMap' => [
                    'Listing' => '',
                ],
                'noMatch' => 'bypass'
            ],
            [
                'GETvar' => 'tx_certifications_certlist[char]',
            ],
        ],
        '194' => 'certificationListingLetterPage',
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
        'membersListingPage' => [
            [
                'GETvar' => 'tx_t3omembership_list[action]',
                'valueMap' => [
                    'list' => '',
                ],
                'noMatch' => 'bypass'
            ],
            [
                'GETvar' => 'tx_t3omembership_list[controller]',
                'valueMap' => [
                    'Listing' => '',
                ],
                'noMatch' => 'bypass'
            ],

            [
                'GETvar' => 'tx_t3omembership_list[membership]',
                'lookUpTable' => [
                    'table' => 'tx_t3omembership_domain_model_membership',
                    'id_field' => 'uid',
                    'alias_field' => 'name',
                    'addWhereClause' => ' AND NOT deleted',
                    'useUniqueCache' => 1,
                    'useUniqueCache_conf' => [
                        'strtolower' => 1,
                        'spaceCharacter' => '-'
                    ],
                    'languageGetVar' => 'L',
                    'languageExceptionUids' => '',
                    'languageField' => 'sys_language_uid',
                    'transOrigPointerField' => 'l10n_parent',
                    'expireDays' => 180,
                ],
            ],
        ],
        '160' => 'membersListingPage',
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
    ],
    'postVarSets' => [
        '_DEFAULT' => [
            'controller' => [
                [
                    'GETvar' => 'tx_news_pi1[action]',
                    'noMatch' => 'bypass'
                ],
                [
                    'GETvar' => 'tx_news_pi1[controller]',
                    'noMatch' => 'bypass'
                ]
            ],
            'dateFilter' => [
                [
                    'GETvar' => 'tx_news_pi1[overwriteDemand][year]',
                ],
                [
                    'GETvar' => 'tx_news_pi1[overwriteDemand][month]',
                ],
            ],
            'page' => [
                [
                    'GETvar' => 'tx_news_pi1[@widget_0][currentPage]',
                ],
            ],
        ],
    ],
];