There is widget.xml in CatalogWidget module. Inside the widget.xml there is
<parameter name="template" xsi:type="select" required="true" visible="true">
<label translate="true">Template</label>
<options>
<option name="default" value="product/widget/content/grid.phtml" selected="true">
<label translate="true">Products Grid Template</label>
</option>
</options>
</parameter>
What is a proper way to change the template file for the widget?
Best Answer
you can extend the widget in your module.
To do that your module has to depend on the module where the original widget is defined (see sequence in the module.xml).
Then you create a widget.xml in your etc dir.
The key is, not to use the widget.xsd (there are many fields required that you do not need for extending) but the widget_file.xsd.
Here is an example to add a template to the static block widget:
Here is another example with a container config, to allow the template for specific containers: