Keywords for metadata description


(James Porich) #1

Matrix Version:
5.4.1.3

The scenario:
I’m currently looking at trying to add some slightly more dynamic functionality to Content Container Templates. A part of this is making use of the Simple Edit Layouts in order to present fields to users.

I’ve gotten my head around most items - however I’m presently trying to print out the Description field that is part of a metadata field.

I’ve gotten the name of the field, the input of the field, however I’m struggling with getting the description value.

I’ve investigated other topics but it looks like no one explicitly got this one

What I’ve tried:

I’m using

%globals_asset_attribute_Description:12345%
%globals_asset_attribute_description:12345%
%globals_asset_metadata_attribute_description:12345%
%globals_asset_metadata_description:12345%
%globals_asset_attribute_metadata_description:12345%

And all sorts of other variations trying to nail it.

Note: This isn’t a metadata field I’ve created called “Description” - but the description value that is standard across all metadata fields.

I’ve managed to get the friendly name using %globals_asset_attribute_friendly_name:12345% but getting the description is proving much trickier. Does this exist? Or do I need to simply hard code the labels in?

Any help anyone could provide on this would be much appreciated!


(Bart Banda) #2

Unfortunately there isn’t a keyword to get the description, the only way to do it via a keyword is to use the new %asset_data% keyword, but that’s only available from 5.4.2.0 and up:
https://matrix.squiz.net/releases/5.4/5.4.2.0#new-features-enhancements_asset_data-keyword


(James Porich) #3

Thanks for the reply Bart!

I can hard code them in the short term until we upgrade to make it dynamic (also wow - that looks like a pretty powerful keyword!)

Cheers


(Emily) #5

A full year later, and this is still very useful! I love the example in the releases notes - it really helps to see how to form the ^index: modifiers onto the asset_data keyword.

This is going to be very helpful. :slight_smile: