More in this section

Forums / Developing with Sitefinity / Custom ViewSettings

Custom ViewSettings

2 posts, 0 answered
  1. Chris Jensen
    Chris Jensen avatar
    2 posts
    Registered:
    01 Dec 2009
    03 Mar 2010
    Link to this post
    I am working on a custom news module.  I've extended the ViewSettings for the admin templates using the instructions specified here: http://www.sitefinity.com/support/kb/sitefinity-3-x/how-to-map-a-view-to-an-external-template-in-sitefinity-3-6-or-later.aspx
    <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemNew" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemNew.ascx" >
      <additionalTemplates>
        <add key="WhatsNew" layoutTemplatePath=""~/Sitefinity/Admin/ControlTemplates/WhatsNew/WhatsNewItemNew.ascx" />
      </additionalTemplates>
    </viewSettings>

    I've gotten the Admin (above) piece to work fine, the appropriate page is being displayed.   But, I'm having problems understanding how to split the public facing pages. 

    <viewSettings hostType="Telerik.News.WebControls.NewsView">
      <additionalTemplates>
        <add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/News/ListPageMaster.ascx" />
        <add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/News/ListPageDetails.ascx" />
      </additionalTemplates>
    </viewSettings

    This is how my ControlConfig file is currently.  How do I specify different templates for these pages if the key="" value is set to ItemListTemplatePath or SingleItemTemplatePath?  How do I specify my provider in the case?

    Any help is greatly appreciated.  Once I clear this hurdle, I am home free!!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    03 Mar 2010
    Link to this post
    Hi Chris Jensen,

    As a key try using SingleItemTemplate and ItemListTemplate - remove the Path appended to each key name
    Another options are mapping the template through NewsView SingleItemTemplatePath and ItemListTemplatePath properties or using the ControlDesigner of NewsView control to map the templates.
    Useful link - Working with presentation modes.


    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