I was wondering if broker query has any criteria which can work for Location/Folder path to search components inside a folder. I am intended to search all the binary components based inside a folder(recursively) in my DXA based application. Can anyone share if there is any out of the box criteria available which can be used to search multimedia components in a folder hierarchy. Thanks in advance.
1 Answer
I did some research and there is no such criteria to look for components in a certain folder. BUT in your case for multimedia components you should try:
PublicationMultimediaPathCriteria criteria = new PublicationMultimediaPathCriteria("/some/MM/path%", Criteria.LIKE);
-
Above criteria won't work as the path is same(Default to publication properties for multimedia path) for all multimedia item. Commented Feb 10, 2017 at 8:38
-
1so... do you mean the folder used in CM? This data is not available once published, unless you add it to the component metadata yourself (manually or through code)– Nuno Linhares ♦Commented Feb 10, 2017 at 17:47