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

Forums / Developing with Sitefinity / Cannot Make Custom Template Work

Cannot Make Custom Template Work

4 posts, 0 answered
  1. William Brumbelow
    William Brumbelow avatar
    6 posts
    Registered:
    02 Aug 2007
    05 May 2009
    Link to this post
    I have followed the instructions for this link explicitly:

    http://www.sitefinity.com/support/knowledge-base/kb-article/b1154K-bcge-b1154T-cgb.aspx

    My app fails to load up from the project manager because the type I specify in the Telerik.Sitefinity.Configuration.ControlsConfig.xml cannot be found.  Here are the contents of the xml config file:

    <?xml version="1.0" encoding="utf-8" ?>
    <controlsConfig>
      <viewMap>
        <!-- Insert a new news item template -->
        <viewSettings hostType="Telerik.Cms.Web.UI.NewsListCustom"
        layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsListCustom.ascx">
        </viewSettings>
      </viewMap>
    </controlsConfig>

    What am I doing wrong?

    Please help.


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 May 2009
    Link to this post
    Hi William Brumbelow,

    The configuration you use is not correct. You are trying to map Telerik.Cms.Web.UI.NewsListCustom, but there is not embedded template with this name. You need to map the hostType of the view you want  to modify and then set the layoutTemplatePath to point to your customized template.

    You can get  a list of all hostTypes under [Sitefinity_3_6_1927_standard_ExternalTemplates]/App_Data/Configuration folder.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. William Brumbelow
    William Brumbelow avatar
    6 posts
    Registered:
    02 Aug 2007
    05 May 2009
    Link to this post
    Thanks Ivan.

    Here is the deal.  I want to customize the NewsView control.  Here are the entries in the ControlsConfig file:

    <viewSettings hostType="Telerik.News.WebControls.NewsView">
          <additionalTemplates>
            <!--Provides user interface for displaying a list of news items in the NewsView control for the News module.-->
            <add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/News/ListPageMaster.ascx" />
            <!--Provides user interface for displaying a single news item in the NewsView control of the News module.-->
            <add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/News/ListPageDetails.ascx" />
          </additionalTemplates>
        </viewSettings>

    How do I customize the NewsView control?  This block references other master pages.  Please help.

    Thanks
    WB
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 May 2009
    Link to this post
    Hi William Brumbelow,

    Please take a look at the following article Mapping ContentViewDesigners and working with Presentation Modes or map the templates directly through NewsView control >> AdvancedMode >> Appearance category -SingleItemTemplatePath and ItemListTemplatePath properties. There is a web editor that you can use to navigate to your external templates.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered