Closed stefan-h-singer closed 7 years ago
So this is actually "right" -- for the _settings.twig
templates, it doesn't create a separate AssetBundle, it just uses your main plugin's AssetBundle.
You can of course change this to be anything you want.
The Widget's _body.twig
template, however, does have a custom AssetBundle just for the widget.
But the generated AssetsBundle was named after the Widget, not the plugin, which is why I had to change the registerAssetBundle call. The generated code did not work out of the box.
However, it probably only happens if you specify a custom name for the widget.
The asset bundle named after the widget is for the _body.twig
template
In my case, the generated generated:
{% do view.registerAssetBundle("wmyl\\wmylforms\\assetbundles\\wmylforms\\WmylFormsAsset") %}
when the class actually is:{% do view.registerAssetBundle("wmyl\\wmylforms\\assetbundles\\latestwmylformswidget\\LatestWmylFormsWidgetAsset") %}