Custom widget duplicated in list of widgets
Hi,
I'm making my first steps on Sitefinity. Installed the trial version yesterday, and now playing around with it.
I'm trying to create a custom widget, and I followed the steps described here:
docs.sitefinity.com/for-developers-add-an-mvc-widget-to-the-toolbox
This works great, I can see the widget in the list of widgets in category "MVC" and with name "Features".
I then wanted to change the category, and see what the difference is between Name and Title, so I changed the attributes in my controller to:
[ControllerToolboxItem(Name = "Features A", Title = "Features B", SectionName = "MyCustomWidgets")]
I restarted the project again to see the effects, and now I see both category "MVC" (with a widget named "Features") and "MyCustomWidgets" (with a widget named "Features B") in the list.
How can I get rid of the old widget in category "MVC" named "Features" ?
And while we're asking, what is the difference between the Name and Title property, as I only seem to get the Title value in the list of widgets, and I don't see the Name value popping up anywhere?
Thank you in advance!
Kurt
Hi Kurt,
When if you will change the widget name in ControllerToolboxItem attribute of your controller, Sitefinity will register another widget with a new name.
If you want to get rid of widget, you can do it in two ways:
1) Edit configuration file manually \App_Data\Sitefinity\Configuration\ToolboxesConfig.configfind and remove line related to old widget
2) Edit settings from Sitefinity backend. Go to Administration -> Settings -> Advanced -> Toolboxes -> Toolboxes -> Page Controls -> MVC -> Tools and delete unnecessary widget
Hi Victor,
Thanks a lot for the clear steps, I managed to get rid of the old widget now.
So I understand that changing the name does not automatically replace the old widget with the renamed one., but instead will create a new copy of the widget. Didn't knew about that, so good to know :)
Kurt