mons/magento-widget
最新稳定版本:1.0.0
Composer 安装命令:
composer require mons/magento-widget
包简介
Useful widget parameter types for page building in Magento 2
README 文档
README
Adds new parameter types for improved widget definition experience in Magento 2.
Parameter types
- Image selector field
- Textarea field
- Wysiwyg field
- Repetable fields (in progress)
Installation
- Install module via composer
composer require mons/module-m2-widget - Register module
php bin/magento setup:upgrade
Usage examples
Image Selector
<parameter xsi:type="block" name="background_image" visible="true" sort_order="10"> <label translate="true">Background Image</label> <block class="Mons\Widget\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>
Textarea
<parameter xsi:type="block" name="body_text" visible="true" sort_order="10"> <label translate="true">Body Text</label> <block class="Mons\Widget\Block\Adminhtml\Widget\Type\Textarea" /> </parameter>
Wysiwyg
<parameter xsi:type="block" name="body_text" visible="true" sort_order="10"> <label translate="true">Body Text</label> <block class="Mons\Widget\Block\Adminhtml\Widget\Type\Wysiwyg"> <!-- optional TinyMCE config --> <data> <item name="toolbar" xsi:type="string">bold italic underline</item> <item name="plugins" xsi:type="string">link</item> </data> </block> </parameter>
Tested working with
- Magento 2.4
- PHP 8.1
Contribution
- Fork this repository
- Create your feature branch (
git checkout -b feature/your-new-feature) or a bugfix branch (git checkout -b bugfix/bug-short-description) always fromdevelop - Commit and submit a new Pull Request
统计信息
- 总下载量: 633
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AFL-3.0
- 更新时间: 2023-01-08