Creating a Widget via Content > Widgets
It doesn't pick up the identity in the _construct() and so just picks up the most recent banner ID.
To fix in Block/Widget/Slider.php
Change
protected function _construct()
to
public function getBannerSlider()
Add the following
protected function _construct()
{
parent::_construct();
}
To activate in magicslider.phtml
Add to the top of the file
<?php $block->getBannerSlider();
This then allows you to create widgets via the wysiwyg and also via Content > Widgets
Creating a Widget via Content > Widgets
It doesn't pick up the identity in the _construct() and so just picks up the most recent banner ID.
To fix in Block/Widget/Slider.php
Change
protected function _construct()to
public function getBannerSlider()Add the following
To activate in magicslider.phtml
Add to the top of the file
<?php $block->getBannerSlider();This then allows you to create widgets via the wysiwyg and also via Content > Widgets