e-conomix/dmatthew-magento2-widget-parameters

Custom widget parameter types for improved CMS Page building

Installs: 9 825

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 24

Type:magento2-module

1.2.1 2022-11-18 09:24 UTC

This package is auto-updated.

Last update: 2024-12-18 13:59:49 UTC


README

Useful widget parameter types for improved CMS Page building in Magento 2. Adds new parameter types like an image selector, wysiwyg text editor, or textarea. You can now use these parameter types in your custom widgets.

How to Use

Image Selector

<parameter xsi:type="block" name="background_image" visible="true" sort_order="10">
    <label translate="true">Background Image</label>
    <block class="Dmatthew\WidgetParameters\Block\Adminhtml\Widget\Type\ImageChooser">
        <data>
            <item name="button" xsi:type="array">
                <item name="open" xsi:type="string">Choose Image...</item>
            </item>
        </data>
    </block>
</parameter>

Image Chooser

Textarea

<parameter xsi:type="block" name="body_text" visible="true" sort_order="10">
    <label translate="true">Body Text</label>
    <block class="Dmatthew\WidgetParameters\Block\Adminhtml\Widget\Type\Textarea" />
</parameter>

Image Chooser

Wysiwyg

<parameter xsi:type="block" name="body_text" visible="true" sort_order="10">
    <label translate="true">Body Text</label>
    <block class="Dmatthew\WidgetParameters\Block\Adminhtml\Widget\Type\Wysiwyg" />
</parameter>

Image Chooser

License

MIT

Attribution

This software uses Open Source software. See the ATTRIBUTION page for these projects.