Image Library Sub Folder
Hi Telerik Team
I would like to select Image Library Sub Folder instead of select top level Image Library.
1.
var album = App.WorkWith().Albums().Where(a => a.Title.Equals("Rotate Image")).Get().FirstOrDefault();
2.
if (album != null)
3.
4.
RadRotator1.DataSource = album.Images().Where(x => x.Status == ContentLifecycleStatus.Live).OrderBy(x => x.Ordinal).ToList();
5.
RadRotator1.DataBind();
6.
Hello Terry,
For the need of hierarchy we have now Libraries on the top and Folders where each child of the Library that is a container for media content is called Folder. A library is a container for files with specific extensions, generally called images, documents and videos.
A folder is a container for the media content but will have only structural presence. Folders do not have permissions, multiple urls etc.
To manage folders, you use LibrariesManager.
So, your code should be something like this:
LibrariesManager albumsManager = LibrariesManager.GetManager(
"OpenAccessDataProvider"
);
var library = albumsManager.GetAlbum(LibrariesModule.DefaultImagesLibraryId);
var folder = albumsManager.GetChildFolders(library).Where(f => f.Title ==
"Rotate Image"
);