-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
None
It must be possible to create an asset reference as a property in a content type by only providing simple configuration in a CT model definition.
Currently it is quite complicated - one must:
- Retrofit the assets app as a CT-based app.
- Create a minimal CT for the assets workspace.
- Decorate the Assets app to add a "contentType" field and change the class.
- Define a property with type "Asset" on your custom content type.
- Provide almost the full field configuration in the app file in order to have the asset link stored properly and also to have a proper preview. (See config sample below)
image: targetWorkspace: dam identifierToPathConverter: class: info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator contentPreviewDefinition: contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
Developer should only have to perform step 2 in the above list.
Acceptance criteria