Image Gallery : How can I setup different template for the &

Posted by Community Admin on 05-Aug-2018 11:34

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

All Replies

Posted by Community Admin on 01-Mar-2012 00:00

Hello,

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 ?


Posted by Community Admin on 01-Mar-2012 00:00

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 "instancename/.../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!
Jochem

Posted by Community Admin on 06-May-2012 00:00

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. :)

This thread is closed