In this recipe, we will configure a new widget type. We have to create a new configuration file where we will initialize the following things for the widget type:
To test the widget configuration, we can navigate to the Widgets page under CMS in the backend to manage the widget instances.
Perform the following steps to create a widget.xml
configuration file.
Create the file
app/code/local/Packt/Productslider/etc/widget.xml
.Add the following code to this file:
<?xml version="1.0" encoding="UTF-8"?> <widgets> <category_product_slider type="catalog/product_list"> <name>Category product slider</name> <description>Displays the products for a given category in a slider widget</description> </category_product_slider> </widgets>
Clear your cache and check...