O'Reilly logo

Magento 2 Development Cookbook by Bart Delvaux

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a widget configuration file

In this recipe, we will extend the features of the Packt_ProductSlider module with a widget configuration file. In this configuration file, we will declare a new widget or frontend app type.

For a new frontend app, we need to configure the following things:

  • Name of the widget (used in the backend)
  • Widget configuration parameters
  • Widget block type
  • Widget templates (the .phtml files)

Getting ready

We will extend the module that we created in the previous recipe with a widget configuration. Ensure that you have the right files installed.

How to do it...

Using the following steps, you can explore the purpose of a widget.xml configuration file:

  1. Create the app/code/Packt/ProductSlider/etc/widget.xml file using the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required