More in this section

Forums / Developing with Sitefinity / Replacing NewsView with custom news provider

Replacing NewsView with custom news provider

2 posts, 0 answered
  1. Chris Jensen
    Chris Jensen avatar
    6 posts
    Registered:
    15 Jul 2009
    15 Apr 2010
    Link to this post
    I've created a custom news module that derives from the Sitefinity NewsView module.  I've gotten everything working as desired.  I have many existing pages that use the NewsView control that I want to update to use the new custom module.

    1) Is there a way to update the desired pages to simply replace the current NewsView control?  Updating every page can be very time consuming.  
    or
    2) Is there a Windows based configurator that can be run on the server hosting Sitefinity?
    or
    3) Is there a way to update the NewsView to tell it to load my custom assembly instead of its default?
    or
    4) Is there another approach that I could take to update many pages that are using the NewsView to the new derived module?

    I appreciate any help you can give me.  Thanks.

    Chris 
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 Apr 2010
    Link to this post
    Hello Chris Jensen,

    Sitefinity NewsView is a public content view based control. The module class is NewsModule and it inherits from SecuredModule

    You could loop through a page control collection and use RemoveControl and AddControl methods to remove the old control and add the new one.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered