- @pvbergen opened merge request.
- Status changed to Fixed
almost 2 years ago 7:02am 30 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
After selecting a media item with the asset browser its title cannot be accessed for further usage - e.g. automatic filling of fields via PDs relations functionality.
Create a pattern that automatically sets a field value based on a media items title. Example:
img:
label: Image
category: Element
pagedesigner: 1
type: component
fields:
image_fiel:
type: image
label: The image
image_title:
type: text
label: The image title text
image_alt:
type: text
label: The image alt text
relations:
image_img:
image_alt:
source_key: alt
override: true
image_title:
source_key: title
override: true
Insert a component in pagedesigner.
The image alt is set according to the alt text of the media items image. However, the title field is not filled out.
The updateTarget()
function of the asset manager only sets id, source & alt. title could also be set, with:
trait.setValueFromAssetManager({
id: this.model.get('id'),
src: this.model.get('src'),
alt: this.model.get('alt'),
preview: this.model.get('preview'),
title: this.model.get('name')
});
Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.