Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paria Shiri 36 posts 109 karma points
    Feb 21, 2022 @ 17:29
    Paria Shiri
    0

    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.

  • Frank Laumann 39 posts 303 karma points
    Feb 22, 2022 @ 06:39
    Frank Laumann
    105

    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

  • Paria Shiri 36 posts 109 karma points
    Feb 22, 2022 @ 10:16
    Paria Shiri
    0

    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.

  • Emma Garland 41 posts 123 karma points MVP 6x c-trib
    Nov 10, 2023 @ 11:40
    Emma Garland
    0

    Hi all, just in case someone comes across this post again, there is an article here about "Configuring Block Editor Label Properties"

Please Sign in or register to post replies

Write your reply to:

Draft