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

Forums / Developing with Sitefinity / Map external master and detail blog templates

Map external master and detail blog templates

10 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    18 Oct 2009
    Link to this post
    Hi,
    I have some trouble during mapping of blog templates. I have executed the step like Ivan blog post but after add to my page i have the next message.

    Map designer. (ok)
    <viewSettings hostType="Telerik.Blogs.WebControls.Design.BlogPostsDesigner" layoutTemplatePath="~/Myfolder/Admin_Custom/Blogs/BlogPostsControlDesigner.ascx" />

    Inside these template.(ok)
     <sf:PresentationMode ID="listPageMode" runat="server"  
                          ModeTitle="List &amp; page"  
                          ModeSettingsId="ModesSettings1"  
                          MasterTemplateName="~/Myfolder/Admin_Custom/Blogs/Modes/ListPageMaster.ascx" 
                          DetailTemplateName="~/Myfolder/Admin_Custom/Blogs/Modes/ListPageDetail.ascx" 
                          CssClass="pageListMode" 
                          SelectedCssClass="selectedOption pageListMode" 
                          > 
     
    Everywher is firing but at render in editor have this (trouble)
    Invalid resource name (~/Myfolder/Admin_Custom/Blogs/Modes/ListPageMaster.ascx) for assembly (Telerik.Blogs, Version=3.7.1990.120, Culture=neutralPublicKeyToken=dfeaee0e3978ac79). 

     All templates have external resource files in 2 languages including default and no others internal resources.I have tested other locations with same issue. Some mistake?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    19 Oct 2009
    Link to this post
    Hi Pierre,

    In the presentation mode mapping you should have used MasterTemplatePath and DetailTemplatePath.
    instead of MasterTemplateName and DetailTemplateName.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Connections Academy Developer
    Connections Academy Developer avatar
    151 posts
    Registered:
    04 May 2005
    23 Oct 2009
    Link to this post
    I'm in the middle of implementing the Sitefinity blog with a completely different look for the list view and the single item view; could you provide more information about adding a new blog view, or point me towards those posts?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    23 Oct 2009
    Link to this post
    Hi Connections Academy ,

    Please take a look at Mapping ContentViewDesigners and working with Presentation Modes .

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    30 Oct 2009
    Link to this post
    Hi Ivan,

    I've followed the instructions in your post and it still doesn't work for me. This is really frustrating in that I can map a control in the ControlsConfig file for the BlogCalendar and for Telerik.News.WebControls.NewsView but it doesn't work for Blog posts. Instead I have to map to a custom BlogPostsControlDesigner.ascx file and in that file edit paths (although I did that and it still doesn't work). I'm running SF 3.7 SP1 and I just want to customize the way a list of blog posts looks like and a blog post, it shouldn't be so hard should it?

    In the external templates download there's a sample controls config file with the following:
        <viewSettings hostType="Telerik.Blogs.WebControls.BlogPosts"
          <additionalTemplates> 
             
            <add key="ItemListTemplatePath" layoutTemplatePath="~/CustomControls/Blogs/ContentViewItemList.ascx" /> 
             
            <add key="SingleItemTemplatePath" layoutTemplatePath="~/CustomControls/Blogs/ContentViewSingleItem.ascx" /> 
          </additionalTemplates> 
        </viewSettings> 

    Why is it you provide that as a sample and yet it doesn't work?

    What's up? Can you possibly shed some light on a way to customize a blog list and a blog post?

    Thanks in advance!
    Phill
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    02 Nov 2009
    Link to this post
    Hi Phill Hodgkinson,

    Try mapping the templates directly through BlogPosts control properties - ItemListTemplatePath and SingleItemTemplate path.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    02 Nov 2009
    Link to this post
    Hi Ivan,

    That worked, thanks! Hopefully in v 4.0 there will be some consistency with how to customize controls and with that the documentation to match.

    Cheers,
    Phill
  8. Connections Academy Developer
    Connections Academy Developer avatar
    151 posts
    Registered:
    04 May 2005
    24 Mar 2010
    Link to this post
    I'm having the same problem (also 3.7 SP1), the external templates for BlogPosts are not being mapped and I have tried using additionalTemplates and inline:

    Example 1:
    <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>

    Example2:

    <viewSettings hostType="Telerik.Blogs.WebControls.BlogPosts" SingleItemTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewSingleItem.ascx" ItemListTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewItemList.ascx" />

    How do I fix this?
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    24 Mar 2010
    Link to this post
    Hello Connections Academy Developer,

    A few post ago we sent a link to the following article - Mapping ContentViewDesigners and working with Presentation Modes . Another option that is suggested in the same thread is Try mapping the templates directly through BlogPosts control properties - ItemListTemplatePath and SingleItemTemplate path.

    The third option is using the configuration below.

    <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>

    Note that the changes in ControlsConfig file applies only after application restart. All these options work without problems in version 3.7 SP3

    Best wishes,
    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.
  10. Kiran
    Kiran avatar
    12 posts
    Registered:
    14 Sep 2010
    02 Dec 2010
    Link to this post
    Thanks. It saved my time.
Register for webinar
10 posts, 0 answered