... | ... |
@@ -24,15 +24,17 @@ $GLOBALS['TL_DCA']['tl_content']['config']['onsubmit_callback'][] = array('tl_co |
24 | 24 |
*/ |
25 | 25 |
$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'eSM_addImage'; |
26 | 26 |
$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'eSM_addText'; |
27 |
+$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'eSM_slick_addImageLink'; |
|
27 | 28 |
$GLOBALS['TL_DCA']['tl_content']['palettes']['slickSliderStart'] = '{type_legend},type;{slickSlider_legend},eSM_slick_autoPlaySpeed,eSM_slick_speed,eSM_slick_initialSlide,eSM_slick_lazyLoad,eSM_slick_slidesToShow,eSM_slick_slidesToScroll,eSM_slick_infinite,eSM_slick_arrows,eSM_slick_pagination,eSM_slick_pause,eSM_slick_fade,eSM_slick_adaptiveHeight;{image_legend},eSM_addImage;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop'; |
28 | 29 |
$GLOBALS['TL_DCA']['tl_content']['palettes']['slickSliderStop'] = '{type_legend},type;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests;{invisible_legend:hide},invisible,start,stop'; |
29 | 30 |
$GLOBALS['TL_DCA']['tl_content']['palettes']['slickSliderSlideStart'] = '{type_legend},type;{slickSlider_legend},eSM_addImage;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop'; |
30 | 31 |
$GLOBALS['TL_DCA']['tl_content']['palettes']['slickSliderSlideStop'] = '{type_legend},type;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests;{invisible_legend:hide},invisible,start,stop'; |
31 |
-$GLOBALS['TL_DCA']['tl_content']['palettes']['slickSliderImage'] = '{type_legend},type;{slickSlider_legend},multiSRC,size,eSM_slick_bgSize,eSM_slick_bgPosition,eSM_slick_minHeight,eSM_slick_bgOpacity,eSM_slick_bgRepeat,eSM_addText;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop'; |
|
32 |
+$GLOBALS['TL_DCA']['tl_content']['palettes']['slickSliderImage'] = '{type_legend},type;{slickSlider_legend},multiSRC,size,eSM_slick_bgSize,eSM_slick_bgPosition,eSM_slick_minHeight,eSM_slick_bgOpacity,eSM_slick_bgRepeat,eSM_slick_addImageLink,eSM_addText;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop'; |
|
32 | 33 |
|
33 | 34 |
|
34 | 35 |
$GLOBALS['TL_DCA']['tl_content']['subpalettes']['eSM_addImage'] = 'multiSRC,size,eSM_slick_bgSize,eSM_slick_bgPosition,eSM_slick_minHeight,eSM_slick_bgOpacity,eSM_slick_bgRepeat'; |
35 | 36 |
$GLOBALS['TL_DCA']['tl_content']['subpalettes']['eSM_addText'] = 'eSM_slick_text,eSM_slick_url'; |
37 |
+$GLOBALS['TL_DCA']['tl_content']['subpalettes']['eSM_slick_addImageLink'] = 'imageUrl,fullsize'; |
|
36 | 38 |
|
37 | 39 |
/** |
38 | 40 |
* Add fields to tl_content |
... | ... |
@@ -186,7 +188,7 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['eSM_addText'] = array |
186 | 188 |
'label' => &$GLOBALS['TL_LANG']['tl_content']['eSM_addText'], |
187 | 189 |
'exclude' => true, |
188 | 190 |
'inputType' => 'checkbox', |
189 |
- 'eval' => array('tl_class'=>'clr m12', 'submitOnChange'=>true), |
|
191 |
+ 'eval' => array('tl_class'=>'clr', 'submitOnChange'=>true), |
|
190 | 192 |
'sql' => "char(1) NOT NULL default ''" |
191 | 193 |
); |
192 | 194 |
|
... | ... |
@@ -199,6 +201,15 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['eSM_slick_minHeight'] = array |
199 | 201 |
'sql' => "char(1) NOT NULL default ''" |
200 | 202 |
); |
201 | 203 |
|
204 |
+$GLOBALS['TL_DCA']['tl_content']['fields']['eSM_slick_addImageLink'] = array |
|
205 |
+( |
|
206 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_content']['eSM_slick_addImageLink'], |
|
207 |
+ 'exclude' => true, |
|
208 |
+ 'inputType' => 'checkbox', |
|
209 |
+ 'eval' => array('tl_class'=>'clr w50','submitOnChange'=>true), |
|
210 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
211 |
+); |
|
212 |
+ |
|
202 | 213 |
$GLOBALS['TL_DCA']['tl_content']['fields']['eSM_slick_bgPosition'] = array |
203 | 214 |
( |
204 | 215 |
'label' => &$GLOBALS['TL_LANG']['tl_content']['eSM_slick_bgPosition'], |
... | ... |
@@ -170,10 +170,16 @@ class ContentSlickSliderImage extends \ContentElement |
170 | 170 |
} |
171 | 171 |
} |
172 | 172 |
|
173 |
+ if ($this->eSM_slick_addImageLink) |
|
174 |
+ { |
|
175 |
+ $this->Template->fullsize = $this->fullsize; |
|
176 |
+ $this->Template->imageLink = ($this->imageUrl ?: $this->singleSRC); |
|
177 |
+ } |
|
178 |
+ |
|
173 | 179 |
if ($this->eSM_addText) |
174 | 180 |
{ |
175 | 181 |
$this->Template->text = nl2br($this->eSM_slick_text); |
176 |
- $this->Template->link = nl2br($this->eSM_slick_url); |
|
182 |
+ $this->Template->link = $this->eSM_slick_url; |
|
177 | 183 |
} |
178 | 184 |
|
179 | 185 |
} |
... | ... |
@@ -50,6 +50,8 @@ $GLOBALS['TL_LANG']['tl_content']['eSM_slick_bgRepeat'][0] = "Hintergrundb |
50 | 50 |
$GLOBALS['TL_LANG']['tl_content']['eSM_slick_bgRepeat'][1] = "Legt fest ob das Hintergrundbild wiederholt werden soll."; |
51 | 51 |
$GLOBALS['TL_LANG']['tl_content']['eSM_addText'][0] = "Ein Text hinzufügen"; |
52 | 52 |
$GLOBALS['TL_LANG']['tl_content']['eSM_addText'][1] = "Dem Bild-Slide ein Text hinzufügen."; |
53 |
+$GLOBALS['TL_LANG']['tl_content']['eSM_slick_addImageLink'][0] = "Bild verlinken"; |
|
54 |
+$GLOBALS['TL_LANG']['tl_content']['eSM_slick_addImageLink'][1] = "Es wird ein Link auf den Bild-Slide gesetzt."; |
|
53 | 55 |
/** |
54 | 56 |
* Legends |
55 | 57 |
*/ |
... | ... |
@@ -50,6 +50,8 @@ $GLOBALS['TL_LANG']['tl_content']['eSM_slick_bgRepeat'][0] = "Background i |
50 | 50 |
$GLOBALS['TL_LANG']['tl_content']['eSM_slick_bgRepeat'][1] = "Defines if the background image is meant to be repeated."; |
51 | 51 |
$GLOBALS['TL_LANG']['tl_content']['eSM_addText'][0] = "Add text"; |
52 | 52 |
$GLOBALS['TL_LANG']['tl_content']['eSM_addText'][1] = "Add a text to the image slide."; |
53 |
+$GLOBALS['TL_LANG']['tl_content']['eSM_slick_addImageLink'][0] = "Add image link"; |
|
54 |
+$GLOBALS['TL_LANG']['tl_content']['eSM_slick_addImageLink'][1] = "Adds an link to the image slide."; |
|
53 | 55 |
/** |
54 | 56 |
* Legends |
55 | 57 |
*/ |
... | ... |
@@ -25,8 +25,8 @@ |
25 | 25 |
<?php endif; ?> |
26 | 26 |
|
27 | 27 |
</div> |
28 |
- <?php if ($this->link): ?> |
|
29 |
- <a class="slide-url" href="<?= $this->link ?>"></a> |
|
28 |
+ <?php if ($this->link || $this->imageLink): ?> |
|
29 |
+ <a class="slide-url" href="<?= ($this->link ?: $this->imageLink) ?>"<?php if ($this->fullsize): ?> data-lightbox="image_slide_<?= $this->id ?>"<?php endif; ?>></a> |
|
30 | 30 |
<?php endif; ?> |
31 | 31 |
</div> |
32 | 32 |
|