Retrieve metadata value from specified asset


(John) #1

Hi

I have a metadata schema with a number of fields/values that are applied to a standard page. I would like to retrieve some of these values, from another page. I would need to specify the target page asset id and the metadata field name in a keyword. Nothing I have tried has worked yet.

Is this possible?

Cheers


(Matthew Harding) #2

Hi John

If I understand correctly you are trying to get the metadata that is a set on another page?

The globals keyword should work %globals_asset_metadata_<fieldname>:<assetid>% where fieldname is the name of the metadata field and assetid is the asset ID of the page you want to get the metadata from.

You can also use %globals_asset_data_metadata:<assetid>% to get all of the metadata applied as a JSON object.

Hope that helps.


(John) #3

Thanks so much, super helpful!