In this post I am going to explain how to create custom widget in magento 2. First we will create the widget configuration file widget.xml, that contains all widget fields. So, create the widget.xml file with following content. File Path: etc/widget.xml <?xml version=”1.0″ encoding=”UTF-8″?> <widgets xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Widget:etc/widget.xsd”> <widget id=”my_module_widget” class=”Ht\Mymodule\Block\Widget\Mymodule”> <label translate=”true”>Ht Mymodule Widget</label> <description>Ht…


Recent Comments