-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathext_localconf.php
More file actions
143 lines (133 loc) · 3.74 KB
/
ext_localconf.php
File metadata and controls
143 lines (133 loc) · 3.74 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
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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Frontend\Controller\ShowImageController;
defined('TYPO3') or die();
// Register eID provider for showpic
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_cms_showpic'] = ShowImageController::class . '::processRequest';
ExtensionManagementUtility::addTypoScriptSetup(
'
# Creates persistent ParseFunc setup for non-HTML content.
lib.parseFunc {
makelinks = 1
makelinks {
http {
keep = path
extTarget = _blank
}
mailto {
keep = path
}
}
tags {
a = TEXT
a {
current = 1
typolink {
parameter.data = parameters:href
title.data = parameters:title
target.data = parameters:target
ATagParams.data = parameters:allParams
}
}
}
nonTypoTagStdWrap {
HTMLparser = 1
HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}
}
}
# Creates persistent ParseFunc setup for RTE content (which is mainly HTML) based on the "default" transformation.
lib.parseFunc_RTE < lib.parseFunc
lib.parseFunc_RTE {
# Processing <ol>, <ul> and <table> blocks separately
externalBlocks = article, aside, blockquote, div, dd, dl, footer, header, nav, ol, section, table, ul, pre, figure, figcaption
externalBlocks {
ol {
stripNL = 1
stdWrap.parseFunc = < lib.parseFunc
}
ul {
stripNL = 1
stdWrap.parseFunc = < lib.parseFunc
}
pre {
stdWrap.parseFunc < lib.parseFunc
}
table {
stripNL = 1
stdWrap {
HTMLparser = 1
HTMLparser {
keepNonMatchedTags = 1
}
}
HTMLtableCells = 1
HTMLtableCells {
# Recursive call to self but without wrapping non-wrapped cell content
default.stdWrap {
parseFunc = < lib.parseFunc_RTE
parseFunc.nonTypoTagStdWrap.encapsLines {
nonWrappedTag =
innerStdWrap_all.ifBlank =
}
}
}
}
# ideally, "div" is not calling itself recursive, but instead uses a similar approach as ol/ul/pre
# so it is a container with content, which does not need to be wrapping <p> tags in it.
div {
stripNL = 1
callRecursive = 1
}
article < .div
aside < .div
figure < .div
figcaption {
stripNL = 1
}
blockquote < .div
footer < .div
header < .div
nav < .div
section < .div
dl < .div
dd < .div
}
nonTypoTagStdWrap {
encapsLines {
encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt
nonWrappedTag = P
innerStdWrap_all.ifBlank =
}
}
}
# Content selection
styles.content.get = CONTENT
styles.content.get {
table = tt_content
select {
orderBy = sorting
where = {#colPos}=0
}
}
# Content element rendering
tt_content = CASE
tt_content {
key {
field = CType
}
default = TEXT
default {
field = CType
htmlSpecialChars = 1
wrap = <p style="background-color: yellow; padding: 0.5em 1em;"><strong>ERROR:</strong> Content Element with uid "{field:uid}" and type "|" has no rendering definition!</p>
wrap.insertData = 1
}
}
'
);
// Register search key shortcuts
$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';