From e7da3f12fc72e8546e70ecfd505f16f1ffb93b40 Mon Sep 17 00:00:00 2001 From: florenttorregrosa Date: Tue, 16 May 2017 22:31:54 +0200 Subject: [PATCH] Issue #2878764 by Grimreaper: Data target not set for Bootstrap carousel --- src/Plugin/Preprocess/BootstrapCarousel.php | 4 +++- .../bootstrap/item-list--bootstrap-carousel-indicators.html.twig | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Plugin/Preprocess/BootstrapCarousel.php b/src/Plugin/Preprocess/BootstrapCarousel.php index 4945971..cb148ac 100644 --- a/src/Plugin/Preprocess/BootstrapCarousel.php +++ b/src/Plugin/Preprocess/BootstrapCarousel.php @@ -75,7 +75,9 @@ class BootstrapCarousel extends PreprocessBase implements PreprocessInterface { '#theme' => 'item_list__bootstrap_carousel_indicators', '#list_type' => 'ol', '#items' => array_keys($variables->slides), - '#target' => "#$id", + '#context' => [ + 'target' => "#$id", + ], '#start_index' => $variables->start_index, ]; } diff --git a/templates/bootstrap/item-list--bootstrap-carousel-indicators.html.twig b/templates/bootstrap/item-list--bootstrap-carousel-indicators.html.twig index bc6103f..b8218a0 100644 --- a/templates/bootstrap/item-list--bootstrap-carousel-indicators.html.twig +++ b/templates/bootstrap/item-list--bootstrap-carousel-indicators.html.twig @@ -22,7 +22,7 @@ <{{ list_type }}{{ attributes.addClass(classes) }} role="menu"> {% for item in items %} {% set item_classes = [start_index == loop.index0 ? 'active'] %} - + {% endfor %} {% endif %} -- 2.1.4