Magestore / Bannerslider-Magento2

Banner Slider Extension on Magento 2 - best way to capture the eyes of visitors!
http://www.magestore.com/banner-slider-on-magento2.html/
82 stars 100 forks source link

multiple instances of div.magestore-bannerslider #70

Open emil-777 opened 8 years ago

emil-777 commented 8 years ago

It seems that there are added several HTML objects (div.magestore-bannerslider) on the site. Also in the case if there is just added one slider on the page.

Please take a look at http://demo-magento2.magestore.com/banner-slider/ and search for "magestore-bannerslider" in frontend.

Is this an error?

davidbrandastic commented 6 years ago

This is a result of the template file not checking if the current slider position actually has banners assigned to it, resulting in an empty div being output anywhere that they layout file indicates a slider can be inserted.

Update your bannerslider.phtml to fix this: if ($html = $block->getChildHtml()) { ?> <div class="magestore-bannerslider"> <?php echo $html; ?> </div> <?php }