How to use a keyword replacement as default value for Metadata related asset field


(Julian) #1

Matrix Version: 5.4.1.2

Hi,

I have a related asset field used as the mechanism to select an image for the open graph metadata field og:image (accessbile via Edit+ metadata screen).

I also have a standard thumbnail select field for the asset that is used to display a thumbnail in asset listings and search results on our website (accessible via Edit+ details screen).

When editing the metadata schema, I want to use %asset_thumbnail_url% as the default value for metadata field og:image, however because it is a related asset field, it only allows the admin user to select an asset, and not insert a keyword replacement. Has anyone got any idea how I can achieve my desired outcome?


(Bart Banda) #2

Do you need a default value at all then? Can’t you just check if the related metadata field is empty, and if it is, print %asset_thumbnail_url% ?