Image Gallery with albums
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.
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;