From 9f0c2b70b514d8dc6db99c71a270e9ec9bbcc427 Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Sun, 21 May 2023 08:32:59 +0200 Subject: [PATCH] Slider block: only show controls/indicators if >1 slides are defined. --- modules/wowchemy/layouts/partials/blocks/slider.html | 5 +++++ modules/wowchemy/layouts/partials/blocks/v1/slider.html | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/modules/wowchemy/layouts/partials/blocks/slider.html b/modules/wowchemy/layouts/partials/blocks/slider.html index d792d21ae..f8db4e056 100644 --- a/modules/wowchemy/layouts/partials/blocks/slider.html +++ b/modules/wowchemy/layouts/partials/blocks/slider.html @@ -6,13 +6,16 @@ {{ $page := .wcPage }} {{ $block := .wcBlock }} {{ $hash_id := .wcIdentifier }} +{{ $slide_count := len $block.content.slides }} +{{ if gt $slide_count 1 }} +{{ end }} +{{ if gt $slide_count 1 }} Previous @@ -89,3 +93,4 @@

Next +{{ end }} diff --git a/modules/wowchemy/layouts/partials/blocks/v1/slider.html b/modules/wowchemy/layouts/partials/blocks/v1/slider.html index 2dbd795eb..18d39ee8b 100644 --- a/modules/wowchemy/layouts/partials/blocks/v1/slider.html +++ b/modules/wowchemy/layouts/partials/blocks/v1/slider.html @@ -6,13 +6,16 @@ {{ $page := .wcPage }} {{ $block := .wcBlock }} {{ $hash_id := .wcIdentifier }} +{{ $slide_count := len $block.Params.content.slides }} +{{ if gt $slide_count 1 }} +{{ end }} +{{ if gt $slide_count 1 }} Previous @@ -83,3 +87,4 @@

Next +{{ end }}