Thumbnail Profiles

Posted by Community Admin on 04-Aug-2018 09:44

Thumbnail Profiles

All Replies

Posted by Community Admin on 09-Dec-2014 00:00

Hi,

For example when creating an album we can specify the list of ThumbnailProfiles to be used to generate the thumbnails when new image is published in the album. However, my question is - is it possible to programatically get the whole list of ThumbnailProfiles ?

Posted by Community Admin on 12-Dec-2014 00:00

Hi Tomasz,

You can get the Thumbnail profiles for an specific album through the ThumbnailsProfile property of the album. E.g:

LibrariesManager manager = LibrariesManager.GetManager();
var thumbnailProfiles = manager.GetAlbums().Where(a => a.Title == "MyAlbum").First().ThumbnailProfiles;


Best Regards,
Junior Dominguez
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 12-Dec-2014 00:00

Hi Junior,

Thanks for your reply. The code included by you is valid but my question referred to the programmatically getting the list of thumbnail profiles present in the Sitefinity's system to be then used when creating the album. So first I want to obtain a list of thumbnail profiles present in the system (all) , then specify which thumbnail profiles will go for the given album during it's creation. Is that possible at all ?

Posted by Community Admin on 12-Dec-2014 00:00

Hi Tomasz,

In that case you can read all the thumbnail profiles from the configurations. e.g:

var manager = ConfigManager.GetManager();
var config = manager.GetSection<LibrariesConfig>();
var thumbnails = config.Images.Thumbnails;


Best Regards,
Junior Dominguez
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 12-Dec-2014 00:00

Thank you Junior for your quick response. I will give it a try soon.

This thread is closed