More in this section
Forums / Designing & Styling / Image Gallery : How can I setup different template for the "Simple list" gallery type

Image Gallery : How can I setup different template for the "Simple list" gallery type

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 1 answered
  1. Elsane
    Elsane avatar
    30 posts
    06 Jan 2012
    01 Mar 2012
    Link to this post

    I need different presentation of my image list. For that I've created different template in "Widget template" for "Images - list".

    Now when I add my Image Gallery Widget on my page, and select "Simple list" in the Gallery type I'm not able to select my custom template. If I modify the template it modify also all my other Image Galleries...

    Do I miss something ?

  2. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    13 Aug 2007
    01 Mar 2012
    Link to this post
    Hey Elsane,

    Yes and no... sorry :)

    Yes, you're doing something wrong because you're trying to link the wrong template. (Look at the first screenshot 'template simple').
    The top option 'Thumbnails+Details page' corresponds with the template 'images - list'. The bottom option 'simple list' corresponds with the template 'images - simple list'.

    So depending if you want thumbnails or directly the full-size images you need to choose the right view with the right altered template.

    No, it's Sitefinity forgetting to induce some usability that's causing the next part user-unfriendly way to change the template:

    Drag and drop the 'image gallery widget' on the screen and click edit.
    Click on 'advanced'.
    Click on 'Control Definition' (button almost at the top)
    Click on 'Views' (button at the bottom)

    Now select the one you wanted to change for this widget
    (btw, for your convenience they're placed in random order - see 2nd screenshot).

    If you wanted thumbnails+details, you'd click the 2nd button.
    Scroll down to 'TemplateKey' and replace the 'DB0D628C-5471-4197-A94F-000000000001' with the GUID from your newly created template.

    Hit OK and save until you're back on the overview again and it should look similar to the 3rd screenshot. (The first widget has template2, the 2nd widget has template 3 assigned)

    Ok so the obvious question remains - where do we find the GUID of your newly created templates...

    Go to Design>>Widget Templates, this will open the template overview. Open the developer tools in your Chrome/Firefox/IE Browser and activate the network tab...

    Now click the template you want to edit, this will load the template editor page. Once it's loaded, scroll in your browser developer tools to the bottom and you'll see something like "http://instancename/Sitefinity/Services/ControlTemplates/ControlTemplateService.svc/26c8b6b8-ce67-4b0e-b8c3-dc4406e7ee6e/?unv_tstmp_prm=...." (see 4th screenshot)

    The bold part is the GUID you're looking for and which needs to be pasted as the TemplateKey.

    And that should have done the trick...

    Good luck!
  3. Andrew
    Andrew avatar
    202 posts
    05 Jun 2009
    06 May 2012
    Link to this post
    I have been looking on how to do this.
    This sounds supper complex. Is this still the case? Or have some changes been implemented?

    It kind of looks like someone has forgotten to give us a drop down list. :)
3 posts, 1 answered