More in this section

Forums / Developing with Sitefinity / External Template: Could not find a type for a name

External Template: Could not find a type for a name

5 posts, 0 answered
  1. Shannaka Beveridge
    Shannaka Beveridge avatar
    8 posts
    Registered:
    09 Aug 2009
    15 Oct 2009
    Link to this post

    Hi,

    I initially put the wrong hostType in the configuration file; I put 'Telerik.News.WebControls.Admin.ListPageDetails' when it should have been 'Telerik.News.WebControls.NewsView'. I corrected this but my page still gives me the error:
    Could not find a type for a name.  The type name was 'Telerik.News.WebControls.Admin.ListPageDetails'.

    My configuration file looks like this:

    <?xml version="1.0" encoding="utf-8" ?>   
    <controlsConfig> 
      <viewMap> 
      <viewSettings hostType="Telerik.News.WebControls.NewsView">  
        <additionalTemplates> 
          <!--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> 
      </viewMap>   
    </controlsConfig>  

    Is there any way I can fix this?

    Thank you,

    Shannaka
  2. Shannaka Beveridge
    Shannaka Beveridge avatar
    8 posts
    Registered:
    09 Aug 2009
    15 Oct 2009
    Link to this post
    It must have been reading the configuration file from a cache. I closed everthing down, restarted iis and it's working now.

    Cheers,

    Shannaka
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Oct 2009
    Link to this post
    Hello Shannaka Beveridge,

    Just to let you know template mappings for ContentView based controls cannot be made through ControlsConfig file. You can gather more information at 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.
  4. Shannaka Beveridge
    Shannaka Beveridge avatar
    8 posts
    Registered:
    09 Aug 2009
    15 Oct 2009
    Link to this post
    Really? The config I posted above worked and it is picking up the new template.

    Regards,

    Shannaka
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 Oct 2009
    Link to this post
    Hello Shannaka Beveridge,

    When you open the control designer the template could be replaced with the default one because the designer is calling MasterTemplateName and DetailTemplateName. Also mapping the presentation mode templates should be done as shown in the post. Furthermore this allows you to have individual templates for several news view controls on the same/ or different pages. 

    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.
Register for webinar
5 posts, 0 answered