Please note that all the child libraries in the top level library are considered folders. So, if you would like to get the images from a nested library (folder), you can first get the folderId
from the image and then find the folder by folderId
and query the images under this folder.
Here is a sample code on how you can get the images under a nested library (folder):
folderId = image.FolderId;
IQueryable<Telerik.Sitefinity.Libraries.Model.Image> GetImagesByFolderId(Guid? folderId)
LibrariesManager librariesManager = LibrariesManager.GetManager();
var images = librariesManager.GetImages().Where(i => i.FolderId == folderId);
You can also take a look at the following article
on how to manage folders using the Folders API. I hope this information helps.
If you filter images by their album id:
var images = librariesManager.GetImages().Where(i => i.Album.Id == albumId);
you will get all the images under the top level library, including the images from the nested libraries (folders).
I hope this information helps.
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