Skip to content

Commit 43db70a

Browse files
committed
[TASK] Remove default Image crop and add example to textimage
1 parent 7431853 commit 43db70a

File tree

3 files changed

+76
-105
lines changed

3 files changed

+76
-105
lines changed

Configuration/TCA/sys_file_reference.php

+1-101
Original file line numberDiff line numberDiff line change
@@ -18,108 +18,8 @@
1818
'1:1' => [
1919
'title' => '1:1',
2020
'value' => 1 / 1
21-
],
22-
'person' => [
23-
'title' => 'Portrait',
24-
'value' => 0.6666
25-
],
26-
],
27-
'selectedRatio' => 'NaN',
28-
],
29-
'tablet' => [
30-
'title' => 'Tablet',
31-
'allowedAspectRatios' => [
32-
'NaN' => [
33-
'title' => 'Free',
34-
'value' => 0.0
35-
],
36-
'3:2' => [
37-
'title' => '3:2',
38-
'value' => 3 / 2
39-
],
40-
'1:1' => [
41-
'title' => '1:1',
42-
'value' => 1 / 1
43-
],
44-
'person' => [
45-
'title' => 'Portrait',
46-
'value' => 0.6666
47-
],
48-
],
49-
'selectedRatio' => 'NaN',
50-
],
51-
'mobile' => [
52-
'title' => 'Mobile',
53-
'allowedAspectRatios' => [
54-
'NaN' => [
55-
'title' => 'Free',
56-
'value' => 0.0
57-
],
58-
'3:2' => [
59-
'title' => '3:2',
60-
'value' => 3 / 2
61-
],
62-
'1:1' => [
63-
'title' => '1:1',
64-
'value' => 1 / 1
65-
],
66-
'person' => [
67-
'title' => 'Portrait',
68-
'value' => 0.6666
69-
],
21+
]
7022
],
7123
'selectedRatio' => 'NaN',
7224
],
7325
];
74-
75-
/*
76-
* Example how to override crop for a single cType
77-
* */
78-
79-
/*
80-
*
81-
* $GLOBALS['TCA']['tt_content']['types']['myCtype']['columnsOverrides']['image']['config']['overrideChildTca']['columns']['crop']['config'] = [
82-
* 'cropVariants' => [
83-
* 'default' => [
84-
* 'disabled' => true,
85-
* ],
86-
* 'tablet' => [
87-
* 'disabled' => true,
88-
* ],
89-
* 'mobile' => [
90-
* 'disabled' => true,
91-
* ],
92-
* 'detailview' => [
93-
* 'title' => 'Detail View Image',
94-
* 'allowedAspectRatios' => [
95-
* '3:2' => [
96-
* 'title' => 'News Detail View 3:2',
97-
* 'value' => 3 / 2
98-
* ]
99-
* ],
100-
* 'selectedRatio' => '3:2',
101-
* ],
102-
* 'slider' => [
103-
* 'title' => 'Big Slider Image',
104-
* 'allowedAspectRatios' => [
105-
* '1920:715' => [
106-
* 'title' => 'Slider Image 1920:715',
107-
* 'value' => 1920 / 715
108-
* ]
109-
* ],
110-
* 'selectedRatio' => '1920:715',
111-
* ],
112-
* 'boxslider' => [
113-
* 'title' => 'Box Slider Image',
114-
* 'allowedAspectRatios' => [
115-
* '1:1' => [
116-
* 'title' => 'Box Slider Image 1:1',
117-
* 'value' => 1 / 1
118-
* ]
119-
* ],
120-
* 'selectedRatio' => '1:1',
121-
* ],
122-
* ],
123-
* ];
124-
*
125-
*/

Configuration/TCA/tt_content_textimage.php

+71
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,74 @@
9393
),
9494
],
9595
];
96+
97+
$GLOBALS['TCA']['tt_content']['types']['startpilot_textimage']['columnsOverrides']['assets']['config']['overrideChildTca']['columns']['crop']['config'] = [
98+
'cropVariants' => [
99+
'default' => [
100+
'title' => 'Desktop',
101+
'allowedAspectRatios' => [
102+
'NaN' => [
103+
'title' => 'Free',
104+
'value' => 0.0
105+
],
106+
'3:2' => [
107+
'title' => '3:2',
108+
'value' => 3 / 2
109+
],
110+
'1:1' => [
111+
'title' => '1:1',
112+
'value' => 1 / 1
113+
],
114+
'person' => [
115+
'title' => 'Portrait',
116+
'value' => 0.6666
117+
],
118+
],
119+
'selectedRatio' => 'NaN',
120+
],
121+
'tablet' => [
122+
'title' => 'Tablet',
123+
'allowedAspectRatios' => [
124+
'NaN' => [
125+
'title' => 'Free',
126+
'value' => 0.0
127+
],
128+
'3:2' => [
129+
'title' => '3:2',
130+
'value' => 3 / 2
131+
],
132+
'1:1' => [
133+
'title' => '1:1',
134+
'value' => 1 / 1
135+
],
136+
'person' => [
137+
'title' => 'Portrait',
138+
'value' => 0.6666
139+
],
140+
],
141+
'selectedRatio' => 'NaN',
142+
],
143+
'mobile' => [
144+
'title' => 'Mobile',
145+
'allowedAspectRatios' => [
146+
'NaN' => [
147+
'title' => 'Free',
148+
'value' => 0.0
149+
],
150+
'3:2' => [
151+
'title' => '3:2',
152+
'value' => 3 / 2
153+
],
154+
'1:1' => [
155+
'title' => '1:1',
156+
'value' => 1 / 1
157+
],
158+
'person' => [
159+
'title' => 'Portrait',
160+
'value' => 0.6666
161+
],
162+
],
163+
'selectedRatio' => 'NaN',
164+
],
165+
]
166+
];

Configuration/TypoScript/ContentElements/lib.fluidtemplates.typoscript

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@ lib.ce_startpilot {
2121
media = max-width
2222
size = 375
2323
maxWidth = 375
24-
cropVariant = mobile
24+
cropVariant = default
2525
}
2626

2727
1 {
2828
media = max-width
2929
size = 480
3030
maxWidth = 480
31-
cropVariant = mobile
31+
cropVariant = default
3232
}
3333

3434
2 {
3535
media = max-width
3636
size = 767
3737
maxWidth = 767
38-
cropVariant = tablet
38+
cropVariant = default
3939
}
4040

4141
3 {
4242
media = max-width
4343
size = 991
4444
maxWidth = 991
45-
cropVariant = tablet
45+
cropVariant = default
4646
}
4747

4848
4 {

0 commit comments

Comments
 (0)