Hello,
I am looking to get access to collection's name that is referenced in the Asset details, screenshot attached. Is there an OSGi service or approaches where I can get this information?
Sajid
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @sajidmomin ,
we can use AssetReferenceSearch
ReferenceSearch referenceSearch = new ReferenceSearch();
referenceSearch.setExact(true);
referenceSearch.setHollow(true);
referenceSearch.setMaxReferencesPerPage(-1);
Collection<ReferenceSearch.Info> resultSet = referenceSearch.search(resolver, assetPath).values();
for (ReferenceSearch.Info info : resultSet) {
//.......... iterate and
}
Reference https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-assets-references-upda...
and if we want to consume in frontend we may use
https://localhost:4502/bin/wcm/references?
_charset_=utf-8
&path=<path of the page>
&predicate=wcmcontent
&exact=false
Reference https://stackoverflow.com/questions/56991862/aem-querybuilder-getting-if-referenced
Thanks
Hi @sajidmomin ,
we can use AssetReferenceSearch
ReferenceSearch referenceSearch = new ReferenceSearch();
referenceSearch.setExact(true);
referenceSearch.setHollow(true);
referenceSearch.setMaxReferencesPerPage(-1);
Collection<ReferenceSearch.Info> resultSet = referenceSearch.search(resolver, assetPath).values();
for (ReferenceSearch.Info info : resultSet) {
//.......... iterate and
}
Reference https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-assets-references-upda...
and if we want to consume in frontend we may use
https://localhost:4502/bin/wcm/references?
_charset_=utf-8
&path=<path of the page>
&predicate=wcmcontent
&exact=false
Reference https://stackoverflow.com/questions/56991862/aem-querybuilder-getting-if-referenced
Thanks
Views
Likes
Replies