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

Forums / Project Feather / Delete or Disable Out of the Box Feather Widget Templates

Delete or Disable Out of the Box Feather Widget Templates

4 posts, 0 answered
  1. Stephen
    Stephen avatar
    2 posts
    Registered:
    19 Jul 2012
    26 May
    Link to this post
    The Feather method of selecting different templates for a widget is great, but the out of the box templates are often surplus to requirements. Is there a way to delete or disable these so that only custom templates may be selected?
  2. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    23 Sep 2016
    30 May
    Link to this post
    Hello,

    You can remove the default templates by deleting the .cshtml files from the respective folder under ResourcePackages. In this case ResourcePackages -> Bootstrap -> MVC -> Views -> ImageGallery.

    Regards,
    Velizar Bishurov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Stephen
    Stephen avatar
    2 posts
    Registered:
    19 Jul 2012
    30 May in reply to Velizar Bishurov
    Link to this post

    Hello and thank you for your response.

    We're using a completely custom resource package, so ResourcePackages/Bootstrap does not exist in our solution or file system. Somehow, the default Bootstrap views still appear in the template dropdown and selecting them still causes the widget to use the (unstyled) default Bootstrap views.

    Are these templates stored anywhere else?

  4. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    23 Sep 2016
    07 Jun
    Link to this post
    Hello,

    In this case you will need to create a custom helper similar to the GetViewNames helper (https://github.com/Sitefinity/feather/blob/6f1c1381faaa80e8114f8e25553767eebc67ee18/Telerik.Sitefinity.Frontend/Mvc/Helpers/ViewSelectorHelpers.cs) that filters out the default views and returns only the custom. You could reuse a call to the default helper and simply filter further.

    After that you will need to create a custom designer view and use the custom helper. You can override the default designer view as you would override a default template: http://docs.sitefinity.com/feather-modify-widget-templates

    Here is the default image gallery designer view: https://github.com/Sitefinity/feather-widgets/blob/master/Telerik.Sitefinity.Frontend.Media/Mvc/Views/ImageGallery/DesignerView.Simple.cshtml

    Regards,
    Velizar Bishurov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered