Image Gallery with albums

Posted by Community Admin on 03-Aug-2018 06:10

Image Gallery with albums

All Replies

Posted by Community Admin on 10-Jul-2013 00:00

Hi,

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. 
www.telerik.com/.../modules-built-in-modules-api-media-modules.html
www.sitefinity.com/.../gallery-list.aspx
www.sitefinity.com/.../how-do-i-get-only-the-image-library-list-to-appear-on-a-page.aspx

But all these end up in an error page. Is there anybody to help me please.

Posted by Community Admin on 12-Jul-2013 00:00

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:
http://www.sitefinity.com/documentation/gettingstarted/create-a-widget-with-sitefinity-thunder

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.
 
Regards,
Tosho Toshev
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 Public Issue Tracking system and vote to affect the priority of the items

This thread is closed