+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom widget duplicated in list of widgets

Custom widget duplicated in list of widgets

3 posts, 0 answered
  1. kavede
    kavede avatar
    0 posts
    Registered:
    27 Oct 2016
    28 Oct
    Link to this post
    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:
    http://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
  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    01 Nov in reply to kavede
    Link to this post

    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

  3. kavede
    kavede avatar
    0 posts
    Registered:
    27 Oct 2016
    02 Nov in reply to Victor Leontyev
    Link to this post
    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
3 posts, 0 answered