From 1259955cb825891a81e7a4f98f2042ee491536ee Mon Sep 17 00:00:00 2001 From: buttle Date: Mon, 13 Sep 2021 14:02:18 +0200 Subject: [PATCH 1/2] sets height per carousel --- src/Site/BlockLayout/Carousel.php | 4 ++-- view/common/block-layout/simple-carousel.phtml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Site/BlockLayout/Carousel.php b/src/Site/BlockLayout/Carousel.php index 045157e..77ac1cf 100644 --- a/src/Site/BlockLayout/Carousel.php +++ b/src/Site/BlockLayout/Carousel.php @@ -93,9 +93,9 @@ class Carousel extends AbstractBlockLayout } } + $wrap = $block->dataValue('wrapStyle') . "height:" . $block->dataValue('height') . ";"; return $view->partial('common/block-layout/simple-carousel', [ 'carousel_id' => 'ic_' . ++$id, - 'height' => $block->dataValue('height'), 'duration' => $block->dataValue('duration'), 'perPage' => $block->dataValue('perPage'), 'loop' => $block->dataValue('loop'), @@ -104,7 +104,7 @@ class Carousel extends AbstractBlockLayout 'images' => $images, 'autoSlide' => $block->dataValue('autoSlide'), 'autoSlideInt' => $block->dataValue('autoSlideInt'), - 'wrapStyle' => $block->dataValue('wrapStyle'), + 'wrapStyle' => $wrap, 'imgStyle' => $block->dataValue('imgStyle'), 'ui_background' => $block->dataValue('ui_background'), 'renderSourceLink' => $block->dataValue('renderSourceLink'), diff --git a/view/common/block-layout/simple-carousel.phtml b/view/common/block-layout/simple-carousel.phtml index 53567ee..2c729a2 100644 --- a/view/common/block-layout/simple-carousel.phtml +++ b/view/common/block-layout/simple-carousel.phtml @@ -8,7 +8,6 @@ @@ -23,7 +21,8 @@
-
+
-
+
+
@@ -47,14 +48,14 @@