Browse code

Add new content element for display text

Benjamin Roth authored on11/07/2025 16:05:11
Showing1 changed files
... ...
@@ -27,6 +27,15 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
27 27
     {invisible_legend:hide},invisible,start,stop
28 28
 ';
29 29
 
30
+$GLOBALS['TL_DCA']['tl_content']['palettes']['display_text'] = '
31
+    {type_legend},type;
32
+    {display_text_legend},vr_dt_plainText,vr_dt_size;
33
+    {template_legend:hide},customTpl;
34
+    {protected_legend:hide},protected;
35
+    {expert_legend:hide},cssID;
36
+    {invisible_legend:hide},invisible,start,stop
37
+';
38
+
30 39
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity,vr_bw_bgBesideContent';
31 40
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_bgBesideContent'] = 'vr_bw_bgHorizontalPosition,vr_bw_bgAsideContentResponsive';
32 41
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-ratio'] = 'vr_bw_mh_ratio';
... ...
@@ -352,3 +361,23 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_subline'] = [
352 361
     'eval'                    => array('maxlength'=>255, 'tl_class'=>'w50'),
353 362
     'sql'                     => "varchar(255) NOT NULL default ''"
354 363
 ];
364
+
365
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_dt_size'] = [
366
+    'inputType' => 'select',
367
+    'options' => ['small', 'medium', 'large', 'h1', 'h2', 'h3'],
368
+    'reference' => &$GLOBALS['TL_LANG']['tl_content']['vr_dt_size_options'],
369
+    'eval' => [
370
+        'includeBlankOption' => true,
371
+        'tl_class' => 'w50'
372
+    ],
373
+    'sql' => "varchar(32) NOT NULL default ''"
374
+];
375
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_dt_plainText'] = [
376
+    'inputType'               => 'textarea',
377
+    'eval'                    => [
378
+        'mandatory'=>true,
379
+        'helpwizard'=>true
380
+    ],
381
+    'explanation'             => 'insertTags',
382
+    'sql'                     => "mediumtext NULL"
383
+];
Browse code

Add an optional subheadline field to content elements

Benjamin Roth authored on17/06/2025 13:43:21
Showing1 changed files
... ...
@@ -346,3 +346,9 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_mobile_vAlign'] = [
346 346
     'eval'      => ['tl_class' => 'w33'],
347 347
     'sql'       => "varchar(20) NOT NULL default ''"
348 348
 ];
349
+
350
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_subline'] = [
351
+    'inputType' => 'text',
352
+    'eval'                    => array('maxlength'=>255, 'tl_class'=>'w50'),
353
+    'sql'                     => "varchar(255) NOT NULL default ''"
354
+];
Browse code

Show aside option only if an image is added

Benjamin Roth authored on29/04/2025 14:50:21
Showing1 changed files
... ...
@@ -10,7 +10,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_width';
10 10
 $GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_bgBesideContent';
11 11
 $GLOBALS['TL_DCA']['tl_content']['palettes']['background_wrapper'] = '
12 12
     {type_legend},type,headline;
13
-    {background_legend},vr_bw_addImage,vr_bw_bgBesideContent,vr_bw_bgColor,vr_bw_bgWidthRestriction;
13
+    {background_legend},vr_bw_addImage,vr_bw_bgColor,vr_bw_bgWidthRestriction;
14 14
     {content_legend},vr_bw_minHeight,vr_bw_width,vr_bw_vAlign,vr_bw_padding,vr_bw_colorInvert;
15 15
     {template_legend:hide},customTpl;
16 16
     {protected_legend:hide},protected;
... ...
@@ -27,7 +27,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
27 27
     {invisible_legend:hide},invisible,start,stop
28 28
 ';
29 29
 
30
-$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity';
30
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity,vr_bw_bgBesideContent';
31 31
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_bgBesideContent'] = 'vr_bw_bgHorizontalPosition,vr_bw_bgAsideContentResponsive';
32 32
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-ratio'] = 'vr_bw_mh_ratio';
33 33
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-vh'] = 'vr_bw_mh_viewport';
Browse code

Add responsive behaviour for image aside setting for background wrapper

Benjamin Roth authored on29/04/2025 09:59:54
Showing1 changed files
... ...
@@ -28,7 +28,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
28 28
 ';
29 29
 
30 30
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity';
31
-$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_bgBesideContent'] = 'vr_bw_bgHorizontalPosition';
31
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_bgBesideContent'] = 'vr_bw_bgHorizontalPosition,vr_bw_bgAsideContentResponsive';
32 32
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-ratio'] = 'vr_bw_mh_ratio';
33 33
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-vh'] = 'vr_bw_mh_viewport';
34 34
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-extended'] = 'vr_bw_widthText';
... ...
@@ -118,6 +118,16 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgHorizontalPosition'] = [
118 118
     'sql'       => "varchar(32) NOT NULL default ''"
119 119
 ];
120 120
 
121
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgAsideContentResponsive'] = [
122
+    'inputType' => 'select',
123
+    'options'   => [
124
+        ''          => 'Unten',
125
+        '-bg-aside-content-reverse'   => 'Oben',
126
+    ],
127
+    'eval'      => ['tl_class' => 'w50'],
128
+    'sql'       => "varchar(32) NOT NULL default ''"
129
+];
130
+
121 131
 $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgHorizontalWidth'] = [
122 132
     'inputType' => 'select',
123 133
     'default'   => '-bg-horizontal-width-50',
Browse code

Add basic background aside functionality

Benjamin Roth authored on28/04/2025 14:39:18
Showing1 changed files
... ...
@@ -28,7 +28,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
28 28
 ';
29 29
 
30 30
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity';
31
-$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_bgBesideContent'] = 'vr_bw_bgHorizontalPosition,vr_bw_bgHorizontalWidth';
31
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_bgBesideContent'] = 'vr_bw_bgHorizontalPosition';
32 32
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-ratio'] = 'vr_bw_mh_ratio';
33 33
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-vh'] = 'vr_bw_mh_viewport';
34 34
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-extended'] = 'vr_bw_widthText';
Benjamin Roth authored on28/04/2025 12:38:01
Showing1 changed files
... ...
@@ -7,9 +7,10 @@ use Contao\System;
7 7
 $GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_addImage';
8 8
 $GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_minHeight';
9 9
 $GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_width';
10
+$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_bgBesideContent';
10 11
 $GLOBALS['TL_DCA']['tl_content']['palettes']['background_wrapper'] = '
11 12
     {type_legend},type,headline;
12
-    {background_legend},vr_bw_addImage,vr_bw_bgColor,vr_bw_bgWidthRestriction;
13
+    {background_legend},vr_bw_addImage,vr_bw_bgBesideContent,vr_bw_bgColor,vr_bw_bgWidthRestriction;
13 14
     {content_legend},vr_bw_minHeight,vr_bw_width,vr_bw_vAlign,vr_bw_padding,vr_bw_colorInvert;
14 15
     {template_legend:hide},customTpl;
15 16
     {protected_legend:hide},protected;
... ...
@@ -27,6 +28,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
27 28
 ';
28 29
 
29 30
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity';
31
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_bgBesideContent'] = 'vr_bw_bgHorizontalPosition,vr_bw_bgHorizontalWidth';
30 32
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-ratio'] = 'vr_bw_mh_ratio';
31 33
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-vh'] = 'vr_bw_mh_viewport';
32 34
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-extended'] = 'vr_bw_widthText';
... ...
@@ -100,6 +102,51 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgOpacity'] = [
100 102
     'sql'       => "varchar(16) NOT NULL default ''"
101 103
 ];
102 104
 
105
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgBesideContent'] = [
106
+    'inputType'               => 'checkbox',
107
+    'eval'                    => ['tl_class' => 'w50','submitOnChange' =>true],
108
+    'sql'                     => ['type' => 'boolean', 'default' => false]
109
+];
110
+
111
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgHorizontalPosition'] = [
112
+    'inputType' => 'select',
113
+    'options'   => [
114
+        ''          => 'Links',
115
+        '-bg-horizontal-align-right'   => 'Rechts',
116
+    ],
117
+    'eval'      => ['tl_class' => 'w50'],
118
+    'sql'       => "varchar(32) NOT NULL default ''"
119
+];
120
+
121
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgHorizontalWidth'] = [
122
+    'inputType' => 'select',
123
+    'default'   => '-bg-horizontal-width-50',
124
+    'options'   => [
125
+        '-bg-horizontal-width-5'  => '5%',
126
+        '-bg-horizontal-width-10'  => '10%',
127
+        '-bg-horizontal-width-15'  => '15%',
128
+        '-bg-horizontal-width-20'  => '20%',
129
+        '-bg-horizontal-width-25'  => '25%',
130
+        '-bg-horizontal-width-30'  => '30%',
131
+        '-bg-horizontal-width-35'  => '35%',
132
+        '-bg-horizontal-width-40'  => '40%',
133
+        '-bg-horizontal-width-45'  => '45%',
134
+        '-bg-horizontal-width-50'  => '50%',
135
+        '-bg-horizontal-width-55'  => '55%',
136
+        '-bg-horizontal-width-60'  => '60%',
137
+        '-bg-horizontal-width-65'  => '65%',
138
+        '-bg-horizontal-width-70'  => '70%',
139
+        '-bg-horizontal-width-75'  => '75%',
140
+        '-bg-horizontal-width-80'  => '80%',
141
+        '-bg-horizontal-width-85'  => '85%',
142
+        '-bg-horizontal-width-90'  => '90%',
143
+        '-bg-horizontal-width-95'  => '95%',
144
+        '-bg-horizontal-width-100' => '100%',
145
+    ],
146
+    'eval'      => ['tl_class' => 'w50'],
147
+    'sql'       => "varchar(32) NOT NULL default ''"
148
+];
149
+
103 150
 $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgColor'] = [
104 151
     'inputType' => 'select',
105 152
     'options'   => [
... ...
@@ -109,7 +156,7 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgColor'] = [
109 156
         '-alt-color-black' => 'Schwarz',
110 157
         '-alt-color-white' => 'Weiß',
111 158
     ],
112
-    'eval'      => ['tl_class' => 'w50', 'includeBlankOption' => true],
159
+    'eval'      => ['tl_class' => 'clr w50', 'includeBlankOption' => true],
113 160
     'sql'       => "varchar(16) NOT NULL default ''"
114 161
 ];
115 162
 
Browse code

Add vertical alignment for GridPlacementWrapper

Benjamin Roth authored on25/04/2025 16:10:45
Showing1 changed files
... ...
@@ -19,7 +19,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['background_wrapper'] = '
19 19
 
20 20
 $GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
21 21
     {type_legend},type,headline;
22
-    {grid_placement_legend},vr_gpw_grid,vr_gpw_tablet_grid,vr_gpw_mobile_grid;
22
+    {grid_placement_legend},vr_gpw_grid,vr_gpw_tablet_grid,vr_gpw_mobile_grid,vr_gpw_desktop_vAlign,vr_gpw_tablet_vAlign,vr_gpw_mobile_vAlign;
23 23
     {template_legend:hide},customTpl;
24 24
     {protected_legend:hide},protected;
25 25
     {expert_legend:hide},cssID;
... ...
@@ -256,3 +256,36 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_mobile_grid'] = [
256 256
     ],
257 257
     'sql' => "text NULL",
258 258
 ];
259
+
260
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_desktop_vAlign'] = [
261
+    'inputType' => 'select',
262
+    'options'   => [
263
+        ''          => 'oben',
264
+        '-va-desktop-center'         => 'mitte',
265
+        '-va-desktop-bottom'         => 'unten',
266
+    ],
267
+    'eval'      => ['tl_class' => 'clr w33'],
268
+    'sql'       => "varchar(20) NOT NULL default ''"
269
+];
270
+
271
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_tablet_vAlign'] = [
272
+    'inputType' => 'select',
273
+    'options'   => [
274
+        ''          => 'oben',
275
+        '-va-tablet-center'         => 'mitte',
276
+        '-va-tablet-bottom'         => 'unten',
277
+    ],
278
+    'eval'      => ['tl_class' => 'w33'],
279
+    'sql'       => "varchar(20) NOT NULL default ''"
280
+];
281
+
282
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_mobile_vAlign'] = [
283
+    'inputType' => 'select',
284
+    'options'   => [
285
+        ''          => 'oben',
286
+        '-va-mobile-center'         => 'mitte',
287
+        '-va-mobile-bottom'         => 'unten',
288
+    ],
289
+    'eval'      => ['tl_class' => 'w33'],
290
+    'sql'       => "varchar(20) NOT NULL default ''"
291
+];
Browse code

Increase row count from 6 to 7 for the GridPlacementWrapper

Benjamin Roth authored on03/03/2025 21:21:14
Showing1 changed files
... ...
@@ -230,7 +230,7 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_grid'] = [
230 230
     'eval'      => [
231 231
         'tl_class' => 'clr',
232 232
         'cols' => 12,
233
-        'rows' => 6,
233
+        'rows' => 7,
234 234
     ],
235 235
     'sql' => "text NULL",
236 236
 ];
... ...
@@ -241,7 +241,7 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_tablet_grid'] = [
241 241
     'eval'      => [
242 242
         'tl_class' => 'clr',
243 243
         'cols' => 12,
244
-        'rows' => 6,
244
+        'rows' => 7,
245 245
     ],
246 246
     'sql' => "text NULL",
247 247
 ];
... ...
@@ -252,7 +252,7 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_mobile_grid'] = [
252 252
     'eval'      => [
253 253
         'tl_class' => 'clr',
254 254
         'cols' => 12,
255
-        'rows' => 6,
255
+        'rows' => 7,
256 256
     ],
257 257
     'sql' => "text NULL",
258 258
 ];
Browse code

Revert removal of position:relative from the background wrapper fragments container and implement a solution to respect the background wrapper content area

Benjamin Roth authored on01/03/2025 23:34:53
Showing1 changed files
... ...
@@ -171,7 +171,8 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_vAlign'] = [
171 171
     'options'   => [
172 172
         ''          => 'oben',
173 173
         '-va-center'         => 'mitte',
174
-        '-va-bottom'          => 'unten',
174
+        '-va-bottom'         => 'unten',
175
+        '-va-stretch'        => 'Höhe des Containers'
175 176
     ],
176 177
     'eval'      => ['tl_class' => 'clr w50'],
177 178
     'sql'       => "varchar(16) NOT NULL default ''"
Browse code

Add a grid placement wrapper content element

Benjamin Roth authored on01/03/2025 21:22:53
Showing1 changed files
... ...
@@ -19,7 +19,7 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['background_wrapper'] = '
19 19
 
20 20
 $GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
21 21
     {type_legend},type,headline;
22
-    {grid_placement_legend},vr_gpw_grid;
22
+    {grid_placement_legend},vr_gpw_grid,vr_gpw_tablet_grid,vr_gpw_mobile_grid;
23 23
     {template_legend:hide},customTpl;
24 24
     {protected_legend:hide},protected;
25 25
     {expert_legend:hide},cssID;
... ...
@@ -233,3 +233,25 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_grid'] = [
233 233
     ],
234 234
     'sql' => "text NULL",
235 235
 ];
236
+
237
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_tablet_grid'] = [
238
+    'exclude' => true,
239
+    'inputType' => 'gridPosition',
240
+    'eval'      => [
241
+        'tl_class' => 'clr',
242
+        'cols' => 12,
243
+        'rows' => 6,
244
+    ],
245
+    'sql' => "text NULL",
246
+];
247
+
248
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_mobile_grid'] = [
249
+    'exclude' => true,
250
+    'inputType' => 'gridPosition',
251
+    'eval'      => [
252
+        'tl_class' => 'clr',
253
+        'cols' => 12,
254
+        'rows' => 6,
255
+    ],
256
+    'sql' => "text NULL",
257
+];
Browse code

Backend definition of GridPlacementWrapper content element

Benjamin Roth authored on28/02/2025 14:58:41
Showing1 changed files
... ...
@@ -17,6 +17,15 @@ $GLOBALS['TL_DCA']['tl_content']['palettes']['background_wrapper'] = '
17 17
     {invisible_legend:hide},invisible,start,stop
18 18
 ';
19 19
 
20
+$GLOBALS['TL_DCA']['tl_content']['palettes']['grid_placement_wrapper'] = '
21
+    {type_legend},type,headline;
22
+    {grid_placement_legend},vr_gpw_grid;
23
+    {template_legend:hide},customTpl;
24
+    {protected_legend:hide},protected;
25
+    {expert_legend:hide},cssID;
26
+    {invisible_legend:hide},invisible,start,stop
27
+';
28
+
20 29
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity';
21 30
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-ratio'] = 'vr_bw_mh_ratio';
22 31
 $GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-vh'] = 'vr_bw_mh_viewport';
... ...
@@ -213,3 +222,14 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_padding'] = [
213 222
     'eval'      => ['mandatory' => false, 'tl_class' => 'w50'],
214 223
     'sql'       => "varchar(24) NOT NULL default ''"
215 224
 ];
225
+
226
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_gpw_grid'] = [
227
+    'exclude' => true,
228
+    'inputType' => 'gridPosition',
229
+    'eval'      => [
230
+        'tl_class' => 'clr',
231
+        'cols' => 12,
232
+        'rows' => 6,
233
+    ],
234
+    'sql' => "text NULL",
235
+];
Browse code

Fix too small field length for padding field in database

Benjamin Roth authored on15/10/2024 15:18:55
Showing1 changed files
... ...
@@ -211,5 +211,5 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_padding'] = [
211 211
         '-padding-bottom-large'  => 'Large Bottom',
212 212
     ],
213 213
     'eval'      => ['mandatory' => false, 'tl_class' => 'w50'],
214
-    'sql'       => "varchar(16) NOT NULL default ''"
214
+    'sql'       => "varchar(24) NOT NULL default ''"
215 215
 ];
Browse code

Initial commit

Benjamin Roth authored on09/10/2024 01:09:48
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,215 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
+
5
+use Contao\System;
6
+
7
+$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_addImage';
8
+$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_minHeight';
9
+$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'vr_bw_width';
10
+$GLOBALS['TL_DCA']['tl_content']['palettes']['background_wrapper'] = '
11
+    {type_legend},type,headline;
12
+    {background_legend},vr_bw_addImage,vr_bw_bgColor,vr_bw_bgWidthRestriction;
13
+    {content_legend},vr_bw_minHeight,vr_bw_width,vr_bw_vAlign,vr_bw_padding,vr_bw_colorInvert;
14
+    {template_legend:hide},customTpl;
15
+    {protected_legend:hide},protected;
16
+    {expert_legend:hide},cssID;
17
+    {invisible_legend:hide},invisible,start,stop
18
+';
19
+
20
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_addImage'] = 'vr_bw_bgSRC,size,vr_bw_bgSize,vr_bw_bgPos,vr_bw_bgOpacity';
21
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-ratio'] = 'vr_bw_mh_ratio';
22
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_minHeight_-mh-vh'] = 'vr_bw_mh_viewport';
23
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-extended'] = 'vr_bw_widthText';
24
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-default-left'] = 'vr_bw_widthText';
25
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-default-right'] = 'vr_bw_widthText';
26
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-extended-left'] = 'vr_bw_widthText';
27
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['vr_bw_width_-width-extended-right'] = 'vr_bw_widthText';
28
+
29
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_addImage'] = [
30
+    'inputType'               => 'checkbox',
31
+    'eval'                    => ['submitOnChange' =>true],
32
+    'sql'                     => ['type' => 'boolean', 'default' => false]
33
+];
34
+
35
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgSRC'] = [
36
+    'inputType' => 'fileTree',
37
+    'eval'      => [
38
+        'tl_class'   => 'clr',
39
+        'multiple'   => false,
40
+        'fieldType'  => 'radio',
41
+        'filesOnly'  => true,
42
+        'extensions' => array_merge(System::getContainer()->getParameter('contao.image.valid_extensions'),['mp4', 'm4v', 'mov', 'wmv', 'webm', 'ogv']),
43
+    ],
44
+    'sql'       => "binary(16) NULL"
45
+];
46
+
47
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgSize'] = [
48
+    'inputType' => 'select',
49
+    'options'   => [
50
+        ''          => 'Beschnitten',
51
+        '-bg-size-contain'   => 'Proportional',
52
+        '-bg-size-stretch' => 'Verzerrt',
53
+        '-bg-size-auto' => 'Originalgröße',
54
+    ],
55
+    'eval'      => ['tl_class' => 'w50'],
56
+    'sql'       => "varchar(16) NOT NULL default ''"
57
+];
58
+
59
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgPos'] = [
60
+    'inputType' => 'select',
61
+    'options'   => [
62
+        '-bg-pos-0-0'       => 'Links | Oben',
63
+        '-bg-pos-50-0'     => 'Mitte | Oben',
64
+        '-bg-pos-100-0'    => 'Rechts | Oben',
65
+        '-bg-pos-0-50'     => 'Links | Mitte',
66
+        '-bg-pos-50-50'   => 'Mitte | Mitte',
67
+        '-bg-pos-100-50'  => 'Rechts | Mitte',
68
+        '-bg-pos-0-100'    => 'Links | Unten',
69
+        '-bg-pos-50-100'  => 'Mitte | Unten',
70
+        '-bg-pos-100-100' => 'Rechts | Unten',
71
+    ],
72
+    'eval'      => ['tl_class' => 'w50', 'includeBlankOption' => true],
73
+    'sql'       => "varchar(16) NOT NULL default ''"
74
+];
75
+
76
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgOpacity'] = [
77
+    'inputType' => 'select',
78
+    'options'   => [
79
+        '-bg-opacity-10'  => '10%',
80
+        '-bg-opacity-20'  => '20%',
81
+        '-bg-opacity-30'  => '30%',
82
+        '-bg-opacity-40'  => '40%',
83
+        '-bg-opacity-50'  => '50%',
84
+        '-bg-opacity-60'  => '60%',
85
+        '-bg-opacity-70'  => '70%',
86
+        '-bg-opacity-80'  => '80%',
87
+        '-bg-opacity-90'  => '90%',
88
+        '-bg-opacity-100' => '100%',
89
+    ],
90
+    'eval'      => ['tl_class' => 'w50', 'includeBlankOption' => true],
91
+    'sql'       => "varchar(16) NOT NULL default ''"
92
+];
93
+
94
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgColor'] = [
95
+    'inputType' => 'select',
96
+    'options'   => [
97
+        '-alt-color-1'  => 'Alternative 1',
98
+        '-alt-color-2' => 'Alternative 2',
99
+        '-alt-color-3' => 'Alternative 3',
100
+        '-alt-color-black' => 'Schwarz',
101
+        '-alt-color-white' => 'Weiß',
102
+    ],
103
+    'eval'      => ['tl_class' => 'w50', 'includeBlankOption' => true],
104
+    'sql'       => "varchar(16) NOT NULL default ''"
105
+];
106
+
107
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_bgWidthRestriction'] = [
108
+    'inputType'               => 'checkbox',
109
+    'eval'                    => ['tl_class' => 'w50 m12'],
110
+    'sql'                     => ['type' => 'boolean', 'default' => false]
111
+];
112
+
113
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_minHeight'] = [
114
+    'inputType' => 'select',
115
+    'options'   => [
116
+        '-mh-small'          => 'Schmal',
117
+        '-mh-medium'         => 'Mittel',
118
+        '-mh-large'          => 'Groß',
119
+        '-mh-vh'        => 'Am Viewport orientiert',
120
+        '-mh-ratio'        => 'Seitenverhältnis',
121
+        '-mh-bgimage'        => 'an Hintergrundbild ausrichten',
122
+        '-mh-custom' => 'Projektdefiniert',
123
+    ],
124
+    'eval'      => ['tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' =>true],
125
+    'sql'       => "varchar(16) NOT NULL default ''"
126
+];
127
+
128
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_mh_ratio'] = [
129
+    'inputType' => 'select',
130
+    'options'   => [
131
+        '-mh-ratio-21-9' => '21:9',
132
+        '-mh-ratio-16-10' => '16:10',
133
+        '-mh-ratio-16-9' => '16:9',
134
+        '-mh-ratio-8-3' => '8:3',
135
+        '-mh-ratio-5-4' => '5:4',
136
+        '-mh-ratio-4-3' => '4:3',
137
+        '-mh-ratio-3-2' => '3:2',
138
+        '-mh-ratio-5-1' => '5:1',
139
+        '-mh-ratio-4-1' => '4:1',
140
+        '-mh-ratio-3-1' => '3:1',
141
+        '-mh-ratio-2-1' => '2:1',
142
+        '-mh-ratio-1-1' => '1:1',
143
+    ],
144
+    'eval'      => ['mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true],
145
+    'sql'       => "varchar(16) NOT NULL default ''"
146
+];
147
+
148
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_mh_viewport'] = [
149
+    'inputType' => 'select',
150
+    'options'   => [
151
+        '-mh-viewport-100' => '100%',
152
+        '-mh-viewport-66' => '66%',
153
+        '-mh-viewport-50' => '50%',
154
+        '-mh-viewport-33' => '33%',
155
+    ],
156
+    'eval'      => ['mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true],
157
+    'sql'       => "varchar(16) NOT NULL default ''"
158
+];
159
+
160
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_vAlign'] = [
161
+    'inputType' => 'select',
162
+    'options'   => [
163
+        ''          => 'oben',
164
+        '-va-center'         => 'mitte',
165
+        '-va-bottom'          => 'unten',
166
+    ],
167
+    'eval'      => ['tl_class' => 'clr w50'],
168
+    'sql'       => "varchar(16) NOT NULL default ''"
169
+];
170
+
171
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_width'] = [
172
+    'inputType' => 'select',
173
+    'options' => [
174
+        ''                      => 'Standard',
175
+        '-width-small'          => 'Schmal',
176
+        '-width-extended'       => 'Erweitert',
177
+        '-width-default-left'   => 'Nach links versetzt',
178
+        '-width-default-right'  => 'Nach rechts versetzt',
179
+        '-width-extended-left'  => 'Nach links erweitert',
180
+        '-width-extended-right' => 'Nach rechts erweitert',
181
+        '-width-full'           => 'Gesamte Viewport-Breite',
182
+    ],
183
+    'eval'      => ['mandatory' => false, 'tl_class' => 'clr w50'],
184
+    'sql'       => "varchar(24) NOT NULL default ''"
185
+];
186
+
187
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_widthText'] = [
188
+    'inputType'               => 'checkbox',
189
+    'eval'                    => ['tl_class' => 'w50 m12'],
190
+    'sql'                     => ['type' => 'boolean', 'default' => false]
191
+];
192
+
193
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_colorInvert'] = [
194
+    'inputType'               => 'checkbox',
195
+    'eval'                    => ['tl_class' => 'w50 m12'],
196
+    'sql'                     => ['type' => 'boolean', 'default' => false]
197
+];
198
+
199
+$GLOBALS['TL_DCA']['tl_content']['fields']['vr_bw_padding'] = [
200
+    'inputType' => 'select',
201
+    'options'   => [
202
+        ''                       => '-',
203
+        '-padding'               => 'Default',
204
+        '-padding-medium'        => 'Medium',
205
+        '-padding-large'         => 'Large',
206
+        '-padding-top'           => 'Small Top',
207
+        '-padding-top-medium'    => 'Medium Top',
208
+        '-padding-top-large'     => 'Large Top',
209
+        '-padding-bottom'        => 'Small Bottom',
210
+        '-padding-bottom-medium' => 'Medium Bottom',
211
+        '-padding-bottom-large'  => 'Large Bottom',
212
+    ],
213
+    'eval'      => ['mandatory' => false, 'tl_class' => 'w50'],
214
+    'sql'       => "varchar(16) NOT NULL default ''"
215
+];