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

Forums / Developing with Sitefinity / Thumbnail Profiles

Thumbnail Profiles

5 posts, 1 answered
  1. Tomasz
    Tomasz avatar
    5 posts
    Registered:
    27 Nov 2014
    09 Dec 2014
    Link to this post

    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 ?

  2. Junior Dominguez
    Junior Dominguez avatar
    115 posts
    Registered:
    02 Dec 2016
    12 Dec 2014
    Link to this post
    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
     
  3. Tomasz
    Tomasz avatar
    5 posts
    Registered:
    27 Nov 2014
    12 Dec 2014
    Link to this post

    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 ?

  4. Junior Dominguez
    Junior Dominguez avatar
    115 posts
    Registered:
    02 Dec 2016
    12 Dec 2014
    Link to this post
    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
     
    Answered
  5. Tomasz
    Tomasz avatar
    5 posts
    Registered:
    27 Nov 2014
    12 Dec 2014 in reply to Junior Dominguez
    Link to this post
    Thank you Junior for your quick response. I will give it a try soon.
5 posts, 1 answered