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

Forums / Developing with Sitefinity / 3.7 template override not working

3.7 template override not working

3 posts, 0 answered
  1. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    13 Aug 2009
    Link to this post
    Hi I'm working with Sitefinity 3.7 and for some reason the template override doesn't seem to be working.  I'm trying to replace the <h1> and <h2> tags with <div> tags. This is the contents of my ~/App_Data/Configuration/Telerik.Sitefinity.Configuration.ControlsConfig.xml

    <?xml version="1.0" encoding="utf-8"?>
    <controlsConfig>
        <viewMap>
            <viewSettings hostType="Telerik.Blogs.WebControls.BlogPosts">
                <additionalTemplates>
                    <!--Provides user interface for displaying a list of posts in the BlogPosts control in the blogs module.-->
                    <add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewItemList.ascx" />
                    <!--Provides user interface for displaying a single post in the BlogPosts control in the blogs module.-->
                    <add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewSingleItem.ascx" />
                </additionalTemplates>
            </viewSettings>
        </viewMap>
    </controlsConfig>

    I have copied ContentViewItemList.ascx and ContentViewSingleItem.ascx to ~/Sitefinity/ControlTemplates/Blogs and ContentViewItemList.ascx.resx and ContentViewSingleItem.ascx.resx to ~/Sitefinity/ControlTemplates/Blogs/App_LocalResources.  I've also added and deleted a space in the web.config.  Can someone please advise?
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    13 Aug 2009
    Link to this post
    Hi Devin,

    Can you please try with the following mapping:
    <viewSettings hostType="Telerik.Blogs.WebControls.BlogPosts"
          <additionalTemplates> 
            <add key="ItemListTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewItemList.ascx" /> 
            <add key="SingleItemTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewSingleItem.ascx" /> 
          </additionalTemplates> 
        </viewSettings> 
     

    Let us know about the results.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  3. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    13 Aug 2009
    Link to this post
    Thanks Georgi this code resolves the issue.
Register for webinar
3 posts, 0 answered