Can we use ASC functionality with some custom component?
Can we use ASC functionality like download, share & load more with some custom component?
Hi @davidjgonzalez,
we have created a new component in this we have to display some list of assets. These assets paths are present in our database rows and have some extra column in it.
We are getting these rows based on some conditions from our backend service with the help of AEM Models & looping these [with data-sly-list]. Now we want to display these assets with ASC existing functionality like download, share, sort by, and load more. Is there any way we can achieve it?
Please help us. Its really urgent . Waiting for your response. Thanks in advance.
If the files themselves dont atleast have a "shell" dam:Asset node in AEM, you may run into problems, since ASC assumes assets surfaced by it are in AEM. But you can try hooking into the Download/Share/Cart function by adding data-* attributes to your custom component item entires. If the modals pop-up but there are no assets listed, its likely that whatever value youre passing via data-asset-share-asset is nto resolvable to a dam:Asset in AEM.
You MIGHT? be able to trick it by exposing the DB assets via a Sling Resource Provider[1], but some of the OOTB DAM Apis used drop down to the JCR API level, so its possible this will break (i havent tried it).
Im very skeptical that, unless you are creating "shell" dam:Asset nodes in AEM that map to the DB entries, you wont be able to perform any searching/filter/sorting on them - sine that is done in ASC using AEM's QueryBuilder API which only queries over the JCR.

[1] https://github.com/Adobe-Consulting-Services/acs-aem-samples/blob/master/core/src/main/java/com/adobe/acs/samples/resourceproviders/impl/SampleResourceProvider.java
Please re-open if you have further questions!