Copied to clipboard

Flag this post as spam?

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


  • Yaco Zaragoza 88 posts 363 karma points
    Sep 27, 2023 @ 18:11
    Yaco Zaragoza
    0

    How do I show a Image/File title on a Blocklist label?

    I am trying to show the link title field on the block list label.

    Right now I am doing this

    {{ 'Link Item' + $index }}

    to show Link 1 Link 2 but would like to show the link title instead

    enter image description here

    enter image description here

    enter image description here

    Can someone tell me what I would put on my label field? I tried doing Link.Name and linkItem.Name but neither worked.

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Sep 27, 2023 @ 22:00
    Marc Goodson
    1

    Hi Yaco

    Would it be something like this...

    {{link[0][\"name\"]}}

    Where 'link' is the alias of the multi url picker on the block list item...

    (essentially even if you have it configured to pick a single link, the angular JS template still stores as an array... So the 0 makes it be the first (and only) links name!

    Regards

    Marc

  • Yaco Zaragoza 88 posts 363 karma points
    Sep 28, 2023 @ 04:02
    Yaco Zaragoza
    0

    Thank you mark, I will test this out and see if it works

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Sep 28, 2023 @ 04:57
    Chriztian Steinmeier
    101

    Hi Yaco,

    Joe has made a nice cheatsheet for these:

    https://joe.gl/ombek/blog/umbraco-angularjs-filter-cheat-sheet

    Which also confirms Marc's suggestion to use {{ link[0].name }} for a MultiUrlPicker property.

    /Chriztian

  • Yaco Zaragoza 88 posts 363 karma points
    Sep 28, 2023 @ 05:22
    Yaco Zaragoza
    0

    Thank you Chriztian for adding the link to the cheat sheet, it is very helpful

    using {{ link[0].name }} worked perfectly.

  • Jay 425 posts 652 karma points
    Jul 08, 2024 @ 14:55
    Jay
    0

    I've used the below fall back just so if it's a Content or Media selected from the Media, I can still overwrite the title without it being blanked

    {{ link[0].name == null ? link[0].nodeName : link[0].name }}
    
Please Sign in or register to post replies

Write your reply to:

Draft