Difficulty trying to display 'asset_metadata' from a text field when using an asset listing


I have an asset listing where under the type format I am compiling metadata information to help structure/form a JSON array.

Name: "%asset_short_name%",
ID: "%asset_assetid%",
Collection: "%asset_metadata_resource_collection_value^empty:Test%",
Description: "%asset_metadata_resource_description_value%"

Which is being used on the asset listing page contents like so.

   <script runat="server">
   var list = [%asset_listing%];
   // Show:
   print(JSON.stringify(list, null, 2));   

With the appropriate paint layout and design, the JSON data is showing on screen. However, it would appear that any of the metadata schemas I try to use which contain a free text value, I am not successfully displaying.

"Name": "Test Name",
"ID": "123",
"Collection": "Collection Name",
"Description": ""

I have verified that the metadata name is correct, and also spelt correctly. Suggestions on what I may be doing wrong to not be able to receive the freetext information in the asset listing?

I have tried to change _value to others such as _key, _content, _raw

Details for the metadata field:

Field name: resource_description
Field type: Text area
Default: Test text is here
Editible: Selected
Enable “use default” option: Selected

Thank you

(John gill) #2

I might have misunderstood the question, but I don’t think the _value suffix has any meaning for Metadata Text Fields. _key and _value are only relevant for Select Fields.

For this field I think you just want %asset_metadata_resource_description%.


Thanks John,
Good to know that _value isnt needed for text fields.