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

Forums / Developing with Sitefinity / Cutomize Admin NewsView template and override SaveContent() at same time

Cutomize Admin NewsView template and override SaveContent() at same time

2 posts, 0 answered
  1. MJia
    MJia avatar
    44 posts
    Registered:
    09 Jun 2009
    15 Apr 2010
    Link to this post
    Hi,
    I added some new meta fields for news and customized the NewsItemNew template.
    I have this setting in ControlsConfig.xml:
          <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemNew" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemNew.ascx">
          </viewSettings>

    It works well, but now I need to override SaveContent() event as well, I created a CustomNewsItemNewView.cs in App_Code, and add this setting into ControlsConfig.xml:
    <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemsView, Telerik.News">
            <views>
              <remove name="NewsItemNew"></remove>
              <add name="NewsItemNew" viewType="CustomNewsItemNewView, App_Code"></add>
            </views>
          </viewSettings>

    But now I cannot see my customized template.

    How should I do for making them both working?

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Apr 2010
    Link to this post
    Hi MJia,

    Override LayoutTemplatePath and LayoutTemplateName in your custom class and set the template you want to use with CustomNewsItemNewView

    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