Hi
I’m migrate Umbraco from version 13 to 15
In U13, for block editor item label, I just define {{country[0].name}} it will show me the first element of value
as the value of content
is
"[{\"id\":\"23\",\"name\":\"Spain\"}]"
where the detail is
{
"contentData" : [ {
"contentTypeKey" : "d568ed02-fc0c-4eba-8b3c-167526400453",
"udi" : null,
"key" : "e6f9be94-6ff2-46a0-ae13-22d2398acb08",
"values" : [ {
"editorAlias" : "masterSelectors",
"culture" : null,
"segment" : null,
"alias" : "country",
"value" : "[{\"id\":\"98\",\"name\":\"Spain\"}]"
} ]
}, {
"contentTypeKey" : "d568ed02-fc0c-4eba-8b3c-167526400453",
"udi" : null,
"key" : "50cc86ed-bf99-45da-b290-243f5aa7ce9d",
"values" : [ {
"editorAlias" : "masterSelectors",
"culture" : null,
"segment" : null,
"alias" : "country",
"value" : "[{\"id\":\"129\",\"name\":\"France\"}]"
} ]
} ],
"settingsData" : [ ],
}
Where will show the value Spain
However, in U15,
I have tried
{= country[0].name}![]()
{umbValue: country | first} ![]()
{umbValue: country[0].name} ![]()
{umbValue: country} ![]()
{umbLink: country.name}![]()
Also for label display, how can do conditional display or iif inside ?
like before
{{ (default == true) ? ‘no value’ : ‘have value’}}
Appreciate for your help.