More in this section

Forums / General Discussions / Image Gallery with albums

Image Gallery with albums

2 posts, 0 answered
  1. shahna
    shahna avatar
    7 posts
    03 Jun 2013
    10 Jul 2013
    Link to this post

    I am using sitefinity image gallery in my project. Here  i want to display the album list with a coverimage. When i click on the album i want to display the images in it. I searched alot and got some links.

    But all these end up in an error page. Is there anybody to help me please.
  2. Tosho Toshev
    Tosho Toshev avatar
    8 posts
    15 May 2014
    12 Jul 2013
    Link to this post
    Hello Shahna,

    Currently our Image Gallery doesn't support library visualization. It lists all images from all folders.
    You can create your own custom widget that implements this functionality. Here is a link to a video that provides more information about how to achieve that:

    The Albums are on the top level of the hierarchy. The user can create unlimited levels of folders under the top Album. If you want to get a list of the Albums, folders and Images the following code snippet does the job:

    var manager = LibrariesManager.GetManager(); //Gets the libraries manager object
    var albums = manager .GetAlbums().ToArray(); //Gets an IQueryable of type Album which is on the top of the hierarchy
                                                                                        //which I have converted to Array for convenience
    //In order to list the folders under an Album, you need to:
     var folders = manager.GetAllFolders(albums[0]);
    //If you want to retreive the images from a folder you can do that by calling the ChildContentItems property
     var images = albums[0].ChildContentItems;

    Your custom widget should first list All albums and when the user chooses an album, it should list the folders using the GetAllFolders methods.
    If you have more questions about custom widgets and image folders. We are happy to assist you.
    Tosho Toshev
    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 Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered