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

Forums / General Discussions / Gallery Lighbox list

Gallery Lighbox list

6 posts, 0 answered
  1. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    09 Nov 2010
    Link to this post
    Hi how do I set the default template for the image gallery listbox in lightbox mode in Sitefinity 3.7?

    Thanks!
    Devin
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Nov 2010
    Link to this post
    Hello Devin,

    1. Map \ImageGalleryControlDesigner.ascx ( How to map a template)
    2. Set MasterTempatePath as described in this post

    <sf:PresentationMode ID="Lightbox"
       runat="server"
       ModeTitle="List & Lightbox"
       ModeSettingsId="ModeSettings2"
       MasterTemplatePath=" relative path to your template"
       SelectedCssClass="selectedOption">


    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
  3. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    09 Nov 2010
    Link to this post
    Hi Ivan,
    I tried this and got this error:

    Invalid resource name (~/Sitefinity/ControlTemplates/Libraries/GalleryListView.ascx) for assembly (Telerik.Libraries, Version=3.7.1990.220, Culture=neutral, PublicKeyToken=dfeaee0e3978ac79) or empty template.

    Please advise.

    Thanks!
    Devin
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Nov 2010
    Link to this post
    Hi Devin,

    The template for Lightbox mode is "GalleryLightboxList.ascx". How have you mapped this template? Note that this will only change the template that the control will use in LightBox mode.

    Greetings,
    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
  5. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    10 Nov 2010
    Link to this post
    Hi Ivan,
    Currently I'm trying to change the lightbox mode only.  Snippet from my project's Telerik.Sitefinity.Configuration.ControlsConfig.xml
    <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.Libraries.WebControls.Design.ImageGalleryDesigner" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/ImageGalleryControlDesigner.ascx" ></viewSettings>
    And ImageGalleryControlDesigner.ascx
    <sf:PresentationMode ID="Lightbox"
                         runat="server"
                         ModeTitle="List & Lightbox"
                         ModeSettingsId="ModeSettings2"                                            
                         MasterTemplateName="~/Sitefinity/ControlTemplates/Libraries/GalleryListView.ascx"
                         SelectedCssClass="selectedOption">
        <Template>
            <asp:RadioButton ID="lightboxRadio" runat="server" />
            <p><asp:Literal ID="Literal2" runat="server" Text="<%$Resources:GalleryDesigner_Lightbox %>" /></p>
        </Template>
    </sf:PresentationMode>

    Do I have to map ~/Sitefinity/Admin/ControlTemplates/Libraries/ImageGalleryControlDesigner.ascx?

    Thanks!
    Devin
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    10 Nov 2010
    Link to this post
    Hello Devin,

    The sample code I sent you, point 2 and the blog post show that you have to use MasterTemplatePath not MasterTemplateName

    All the best,
    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
Register for webinar
6 posts, 0 answered