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 82 posts 346 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 2148 posts 14353 karma points MVP 8x 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 82 posts 346 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 2798 posts 8788 karma points MVP 7x 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 82 posts 346 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 420 posts 646 karma points
    6 days ago
    Jay
    100

    I tend to use the below, as I realised if you picked a media item. It will not automatically pulls through the name (as it's empty by default). So the below falls will also render out 'nodeName' if the 'name' is empty. Which works nicely no matter if it's a content / media / external url being selected.

    {{ link[0].name }} {{ link[0].nodeName }}

Please Sign in or register to post replies

Write your reply to:

Draft