Douglas
(Douglas (@finnatic at @waikato))
October 30, 2016, 10:57pm
1
https://matrix.squiz.net/manuals/keyword-replacements/chapters/metadata details the various keywords available for metadata.
There are ways to get the fieldname, or a key or value… is there anyway to get the Metadata field description that gets shown when a user is editing metadata via _admin or _edit?
I’m working on an asset builder (with a custom form), so if that was available it would be really useful.
PeterM
(Peter McLeod)
October 31, 2016, 2:02am
2
Hi
Not sure with keywords, but you could access it using a JS API > getAttributes method, passing it the ID of the metadata field asset:
js_api.getAttributes({
"asset_id":"100",
"dataCallback":customDataCallbackFunc
});
You would get an object back similar to below:
{
"weighting": "-1",
"editable": "1",
"field_name_text": "",
"value_name_text": "",
"description": "",
"default": "",
"language": "",
"frontend": "show",
"value_components": "",
"is_contextable": "1",
"required": "0",
"allow_cascading": "1",
"name": "",
"friendly_name": "",
"scheme": "",
"multi_line": "0",
"char_limit": "0",
"box_width": "30",
"box_height": "7"
}
Probably not an ideal solution for your scenario though…
Thanks
Peter
Bart
(Bart Banda)
November 1, 2016, 12:13am
3
Can you try printing %globals_asset_attribute_description:1234% where 1234 is the asset ID if your metadata field?