Hi everyone,
I’m working with Umbraco 15 and trying to use Umbraco Flavored Markdown (UFM) to display a custom label for a Block List item based on a Multi Url Picker field.
What I want to achieve:
In a Block List, I want to set the label to display the name of the selected link from a Multi Url Picker field (url
). The picker only allows one link, so I need to extract the name
of the first (and only) link.
What I have tried:
According to the official documentation, I have tried:
Basic access to the
url
field:
{umbValue: url}
Result: [object Object]
Extracting JSON representation:
{umbValue: url | json}
{umbValue: url | stringify}
Result: [object Object]
(does not show the structure)
Accessing first item in
IEnumerable<Link>
(Multi Url Picker returns a collection)
{umbValue: url | first | select:"name"}
{umbValue: url | map:"name" | first}
Result: [object Object]
Direct access to first element:
{umbValue: url[0].name}
Result: (empty)
Parsing JSON if stored as a string:
{umbValue: url | parse-json | first | select:"name"}
Result: [object Object]
Issue:
It seems UFM cannot correctly process IEnumerable<Link>
from a Multi Url Picker in a Block List. Even json
does not return a readable string.
Question:
How can I correctly extract and display the name of the first link from a Multi Url Picker field in a Block List label using UFM?
Any insights or workarounds would be greatly appreciated!
Thanks in advance!