I would suggest to get the default installation of Kentico and take a look how it is done there. If you get Corporate site example and go examples/web parts/media library/media library viewer
. You will see the example of the default usage of this web part.
From what I see you would need 2 pages:
- Page with media library viewer web part - to list and filter media libraries
- Page with media gallery web part - list the content of selected media library.
To simplify the process you can make the gallery page work with query string so
in the library viewer transformation you do something like:
<a href="~/Examples/Web-parts/Media-library/Media-gallery-file-list.aspx?LibraryCodeName=<%#Eval("LibraryName")%>">
<%# LimitLength(ResHelper.LocalizeString(Convert.ToString(Eval("LibraryDisplayName", true))), 20, "...") %>
</a>
on the gallery page you make datasource web part take the name of library from query string
So Basically I've taken two examples and linked them together:
- /Examples/Web-parts/Media-library/Media-libraries-viewer.aspx
- /Examples/Web-parts/Media-library/Media-gallery-file-list.aspx
Hope this will get you started.
P.S. Filtering is done on the media library table, actually two main tables are:
select * from Media_File
select * from Media_library
Where you use media library viewer it works with Media_library which table doesn't have the filePath column, but is has LibraryFolder column, so you use WHERE like:
LibraryFolder LIKE N'U21%'