We have a headless implementation where many of our content fragment models use images as a Content Reference type field. I cannot see all the content fragments which are using a particular image inside references panel. I'm wondering if there is a way for the content author to check all the component fragments before updating any of the images. Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
@MukeshAEM For that need to write some custom logic around it as there is no OOTB method to directly provide the reference.
You can create the query something like
It will provide all the references for the same.
ACS Commons Reports can also be leveraged for the same (https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/index.html) where you can pass the asset url and the complete report will be displayed as per the business requirement for the columns required.
Hope this helps!
Thanks
Hi @MukeshAEM IMO, you can try out by adding the custom Javascript.
Category to be used for the reference : dam.cfm.authoring.contenteditor.v2
Tried out by sending out the data by hitting the servlet for validation e.g.
(function($, ns, window) {
'use strict';
var tempPath = $("#aem-cfm-editor-elements-form").data("fragment");
$.ajax({
url: "<path-to-servlet>",
data: {
path: tempPath
}
}).done(function(result) {
// any business logic to be added here to display pop-up etc.
});
})($, window.Dam.CFM, window);
Hope this helps!
Thanks
Hi @ShaileshBassi, thanks for your suggestion. I'm investigating whether an OOTB option is available for the content editor to check if any content fragment uses the image before updating or deleting.
If I manually add the relation with any content fragment, it starts showing in the references. Wondering if there is any way that it maintains this relationship automatically when used inside any content fragment.
@MukeshAEM For that need to write some custom logic around it as there is no OOTB method to directly provide the reference.
You can create the query something like
It will provide all the references for the same.
ACS Commons Reports can also be leveraged for the same (https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/index.html) where you can pass the asset url and the complete report will be displayed as per the business requirement for the columns required.
Hope this helps!
Thanks
Views
Likes
Replies