I have a blockList which has a block, the block has a MultiTreePicker doctype, set to single. I like to have a label based on the link name, is it possible?
I know I can access a string field with XXX alias like this {{XXX}}, I tried {{link.name}} but it's not working.
If your property links to a content, media or member node, you can
use the Angular filter {{ pickerAlias | ncNodeName }} to show the
node name rather than the node ID.
If your property is a rich text editor, you can use the Angular
filter {{ pickerAlias | ncRichText }} to show the unformatted text.
You can use conditional logic to show text instead of 1 or 0 for a
true/false property: {{checkboxPickerAlias == 1 ? 'Yes' : 'No'}}.
For more complex property types, you can display specific attributes
by referencing the JSON attribute. For example, if using the
MultiUrlPicker, show the name of the first link using
{{urlPickerAlias[0]["name"]}}.
Since your property is a multiple tree picker I would try something like:
{{alias | ncNodeName}} or maybe {{alias[0]["name"]}}
I had a feeling saw that documentation somewhere but couldn't remember where. I wish they have made better documentation for Umbraco, this isn't my first problem and won't be the last.
by the way I used {{Link[0]['name']}} - {{Link[0]["name"]}} both workikng, Link is the alias.
BlockListEditor Label
I have a blockList which has a block, the block has a MultiTreePicker doctype, set to single. I like to have a label based on the link name, is it possible? I know I can access a string field with XXX alias like this {{XXX}}, I tried {{link.name}} but it's not working.
Hi Paria
I wish this was documented better as well.
I managed to find the following at https://our.umbraco.com/Documentation/Fundamentals/Backoffice/Property-Editors/Built-in-Property-Editors/Nested-Content/:
If your property links to a content, media or member node, you can use the Angular filter {{ pickerAlias | ncNodeName }} to show the node name rather than the node ID.
If your property is a rich text editor, you can use the Angular filter {{ pickerAlias | ncRichText }} to show the unformatted text.
You can use conditional logic to show text instead of 1 or 0 for a true/false property: {{checkboxPickerAlias == 1 ? 'Yes' : 'No'}}.
For more complex property types, you can display specific attributes by referencing the JSON attribute. For example, if using the MultiUrlPicker, show the name of the first link using {{urlPickerAlias[0]["name"]}}.
Since your property is a multiple tree picker I would try something like: {{alias | ncNodeName}} or maybe {{alias[0]["name"]}}
I hope you find a way to make it work.
Best regards Frank
thank you so much!
I had a feeling saw that documentation somewhere but couldn't remember where. I wish they have made better documentation for Umbraco, this isn't my first problem and won't be the last.
by the way I used {{Link[0]['name']}} - {{Link[0]["name"]}} both workikng, Link is the alias.
note: the alias is case sensitive.
Hi all, just in case someone comes across this post again, there is an article here about "Configuring Block Editor Label Properties"
is working on a reply...