Check how to hide widget
Closed this issue · 4 comments
tkotosz commented
Check if it is possible to declare a widget in the widget.xml in a way it will not appear as available widget option in the admin.
kispali commented
visible="false" is the solution for that.
<parameter name="sample_id" xsi:type="text" visible="false" required="false">
tkotosz commented
thats for a parameter in the widget, but I mean is it possible to hide the widget from the widget dropdown (where you can choose which widget you would like to insert)?.
So does something like this work?:
<widget id="my_hidden_widget" class="My\Hidden\Widget" visible="false">
kispali commented
Unfortunately it's not possible. See https://github.com/magento/magento2/blob/develop/app/code/Magento/Widget/Model/Widget.php#L240
tkotosz commented
ok, I found how to do it ;)