Delivery API resolving jcrReference and assetReference within

Skip to first unread message

Christoph Damm

Sep 29, 2022, 6:42:14 AMSep 29
to Magnolia User Mailing List
Hello again,

I am looking for direction for the following use case:
Within a product app a user wants to select a folder from within the DAM containing images.
Over the delivery API I want to pass all off those asset links to my frontend in order to render those. So basically instead of having a multi field where user has to add specifically all images he wants to just select a folder and all assets of this folder should be rendered.

I'm struggling to get those references resolved though via the delivery API.
Image folder would be as such:

- name: imagesFolderReference
  propertyName: imagesFolder
    targetWorkspace: dam

However, how would I be able to resolve the asset references within those references? (as those are returned as nodes only of course)
Can the assetresolver somehow be "chained" to it? Or can/would I have to write an own resolver for that?

Thanks for ideas or pointing me into the right direction!



Mikaël Geljić

Sep 29, 2022, 11:25:46 AMSep 29
to Magnolia User-List
Hi Christoph,

This can likely be done with a custom ReferenceResolver implementation.

Similar to the JcrReferenceResolver, you would:
* inject the magnolia Context (Provider<Context>) to get a JCR dam session from,
* inject the AssetProviderRegistry to create an AssetReferenceResolver programmatically
* iterate over the folder's nodes and delegate to this resolver instance?

Hope that makes sense 🤞

You received this message because you are subscribed to the Google Groups "Magnolia User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web, visit

Reply all
Reply to author
0 new messages