diff --git a/src/QUI/Bricks/Controls/Children/Slider.css b/src/QUI/Bricks/Controls/Children/Slider.css index 69cf4654bf18ebe61c87e0837b56c0ea68d71663..dcabd7139e4d4660716b4962f3dbf0e178e3dbb6 100644 --- a/src/QUI/Bricks/Controls/Children/Slider.css +++ b/src/QUI/Bricks/Controls/Children/Slider.css @@ -48,12 +48,21 @@ text-align: center; } +.quiqqer-bricks-children-slider-moreLink-text { + bottom: 0; + left: 0; + padding: 20px; + position: absolute; + width: 100%; +} + .quiqqer-bricks-children-slider-child-display:first-child { margin: 0 10px 0 0; } .quiqqer-bricks-children-slider-child a { display: block; + position: relative; } .quiqqer-bricks-children-slider-child .quiqqer-icon { diff --git a/src/QUI/Bricks/Controls/Children/Slider.html b/src/QUI/Bricks/Controls/Children/Slider.html index 6e47f434416fa8c63a0ecfca3710adf71fb7525f..2542ba42dd145feefa7da7562e58a3ac5e371654 100644 --- a/src/QUI/Bricks/Controls/Children/Slider.html +++ b/src/QUI/Bricks/Controls/Children/Slider.html @@ -38,22 +38,17 @@ </li> {/foreach} {/strip} - {if $this->getAttribute('moreLink')} - <li> + + {if $MoreLink} + <li class="quiqqer-bricks-children-slider-child"> <article class="quiqqer-bricks-children-slider-child-display"> <a href="{url site=$MoreLink}" title="{$MoreLink->getAttribute('title')|escape:" html"}"> - {if !$MoreLink->getAttribute('image_site')} - <header> - {$MoreLink->getAttribute('title')} - </header> - {$MoreLink->getAttribute('short')} - {else} - {image src=$MoreLink->getAttribute('image_site') height=$this->getAttribute('height')} - {/if} + <span class="quiqqer-icon fa fa-angle-right"></span> + <span class="quiqqer-bricks-children-slider-moreLink-text">Mehr</span> </a> </article> </li> - {/if} + {/if} </ul> </div> </div> diff --git a/src/QUI/Bricks/Controls/Children/Slider.php b/src/QUI/Bricks/Controls/Children/Slider.php index 075a2adb849581f289fcd6d0838e89de94fbe2b4..af0023d8372c7bdef7b9e08f28decd26001fec6c 100644 --- a/src/QUI/Bricks/Controls/Children/Slider.php +++ b/src/QUI/Bricks/Controls/Children/Slider.php @@ -47,15 +47,24 @@ public function __construct($attributes = array()) */ public function getBody() { - $Engine = QUI::getTemplateManager()->getEngine(); + $Engine = QUI::getTemplateManager()->getEngine(); + $MoreLink = null; if (!$this->getAttribute('height')) { $this->setAttribute('height', 200); } + if ($this->getAttribute('moreLink')) { + try { + $MoreLink = QUI\Projects\Site\Utils::getSiteByLink($this->getAttribute('moreLink')); + } catch (QUI\Exception $Exception) { + } + } + $Engine->assign(array( 'this' => $this, - 'children' => $this->getChildren() + 'children' => $this->getChildren(), + 'MoreLink' => $MoreLink )); return $Engine->fetch(dirname(__FILE__) . '/Slider.html');