Skip to content

Creating a Widget via Content > Widgets - Error #9

Description

@kestraly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions