Showing results for 
Search instead for 
Did you mean: 

Add a Template to Core Widget

Add a Template to Core Widget

I wante to add a template to the catalog product list widget. Currently there is only a grid template. Anyone know how this is done?


Re: Add a Template to Core Widget

I've gotten a little further with this.  I can easily add an option by creating a new module with this in /app/code/Vender/Module/etc/widget.xml:


<?xml version="1.0" encoding="UTF-8"?>
<widgets xmlns:xsi=""
    <widget id="products_list">
            <parameter name="template" xsi:type="select">
                    <option name="homepage" value="product/widget/content/homepage.phtml">
                        <label translate="true">Homepage Template</label>

But Magento won't use the template unless I put it here: /vendor/magento/module-catalog-widget/view/frontend/templates/product/widget/content/ which doesn't seem right.  I would think it'd be better here: /app/code/Vender/Module/view/frontend/templates/product/widget/content/