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
    09 Jun 2009
    15 Apr 2010
    Link to this post
    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">

    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">
              <remove name="NewsItemNew"></remove>
              <add name="NewsItemNew" viewType="CustomNewsItemNewView, App_Code"></add>

    But now I cannot see my customized template.

    How should I do for making them both working?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    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

    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