Expand my Community achievements bar.

SOLVED

AEM 6.5.12 | Assets referencing image is not showing

Avatar

Level 4

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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

Shailesh_Bassi__0-1681928983423.png

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

 

View solution in original post

3 Replies

Avatar

Community Advisor

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

 

Avatar

Level 4

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.

MukeshAEM_0-1681901702996.png

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_2-1681902058554.png

 

 

 

Avatar

Correct answer by
Community Advisor

@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

Shailesh_Bassi__0-1681928983423.png

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