Nested Image libraries issues/help
In Sitefinity Image libraries I have this scenario(nested libraries):
At the root level:
Brand1_library
Brand2_library
Brand3_library
Brand4_library
Under each Brand library I have another set of sub libraries with the same name:
Shirts, Pants, Accessories, Jackets etc.
And under each of these libraries I have two sub-libraries with the same name:
Large, Small
Large and Small libraries hold the regular and the thumbnail images.
On my website page I would programmatically know, which brand and which product images to display. Not all product types are to be shown for all brands.
How do I access all libraries within brand libraries and so on until I reach the images at level 3?
Depending on the brand, I have tried librariesmanager.getalbums().Where(a=>a.title=="brand1_library") which would return the top root level album for me. From there I am not sure which way I need to go to get sub-libraries of the top level libraries.
Any help or direction is appreciated. Thanks!
Hello Phani,
You can use the GetAllFolders method to get all child libraries of a parent folder:
var parent = manager.GetFolder(Id);
var children = manager.GetAllFolders(parent);