- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2016
06:26 PM
04-22-2016
06:26 PM
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?
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2016
04:46 PM
04-25-2016
04:46 PM
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="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Widget:etc/widget.xsd"> <widget id="products_list"> <parameters> <parameter name="template" xsi:type="select"> <options> <option name="homepage" value="product/widget/content/homepage.phtml"> <label translate="true">Homepage Template</label> </option> </options> </parameter> </parameters> </widget> </widgets>
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/