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

Forums / Bugs & Issues / Image Gallery Control Templates Problem

Image Gallery Control Templates Problem

5 posts, 1 answered
  1. Axe
    Axe avatar
    16 posts
    Registered:
    11 Feb 2007
    05 Oct 2009
    Link to this post
    I am using the latest version 3.7 SP1 and trying to map the Image Gallery.
    I have the file in App_Data/Configuration/Telerik.Sitefinity.Configuration.ControlsConfig.xml with these contents:
    <?xml version="1.0" encoding="utf-8"?>  
    <controlsConfig> 
      <viewMap> 
        <viewSettings hostType="Telerik.Libraries.WebControls.ImageGallery">  
          <additionalTemplates> 
            <add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Libraries/GalleryListView.ascx" /> 
            <add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Libraries/GalleryListViewItem.ascx" /> 
          </additionalTemplates> 
        </viewSettings> 
     
        <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> 
      </viewMap> 
    </controlsConfig> 

    The News works fine but nothing for Image Gallery. Normally if the templates are not copied to the correct file you get an error but I don't get this error. I add text to the templates and see no result. It must be the mapping of this particular template(s).
    I have tried a few other and they all seem to work so far.
    Have I mistyped something for Image Gallery - I copied from the control templates download you provide.

    Can you try it out and let me know please.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Oct 2009
    Link to this post
    Hello Axe,

    Thank you for using our services.

    Can you try to map the external templates with the following lines:
     <viewSettings hostType="Telerik.Libraries.WebControls.ImageGallery"
          <additionalTemplates> 
            <add key="ItemListTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Libraries/GalleryListView.ascx" /> 
            <add key="SingleItemTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Libraries/GalleryListViewItem.ascx" /> 
          </additionalTemplates> 
        </viewSettings> 


    After mapping the control templates, restart your website. Note the differences in the key names.

    This should do the trick.

    All the best,
    Radoslav Georgiev
    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.
    Answered
  3. Axe
    Axe avatar
    16 posts
    Registered:
    11 Feb 2007
    05 Oct 2009
    Link to this post
    Thank you for quick response :)
    This works.
  4. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    09 Nov 2009
    Link to this post
    I had the same problem!

    <

     

    viewSettings hostType="Telerik.Libraries.WebControls.ImageGallery">

     

    <

     

    additionalTemplates>

     

    <

     

    add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/MyLibraries/GalleryListView.ascx" />

     

    <

     

    add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/MyLibraries/GalleryListViewItem.ascx" />

     

    <

     

    add key="ItemListTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/MyLibraries/GalleryListView.ascx" />

     

    <

     

    add key="SingleItemTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/MyLibraries/GalleryListViewItem.ascx" />

     

     

    </

     

    additionalTemplates>

     



    Can you explain the difference bettween the ItemListTemplatePath and ItemListTemplate.

    Is it just wrong in the downloaded templates config.xml file?

    I assume other have the same problem. So you might want to adjust the config.xml file

    Regards Markus

  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Nov 2009
    Link to this post
    Hi Markus Berchtold,

    Please use Advanced tab - ItemListTemplatePath and SingleItemtemplatePath properties to map the templates. ImageGallery is a ContentView based control and the following rules applies when working with its templates - Mapping ContentViewDesigners and working with Presentation_Modes

    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, 1 answered