Copied to clipboard

Flag this post as spam?

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


  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Nov 12, 2016 @ 08:06
    Michaël Vanbrabandt
    0

    Name Template show name instead of id

    Hi,

    In the Name Template we can add the propertyAlias to show a different naming then Item 1.

    But what if this is a Multinode Treepicker or any other picker which holds an id of the selected item.

    Now it shows the id but I would like to show the name of the selected item. Can we do this?

    /Michaël

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 14, 2016 @ 09:59
    Lee Kelleher
    102

    Hi Michaël,

    To customise the name template, you can use Angular filters, so you'd have...

    {{ pickerAlias | filterName }}
    

    For the node names, Matt put together an example for a single content picker...

    https://gist.github.com/mattbrailsford/d7f512ca4a6f24ebe70ebed82eb163f5

    So you can use...

    {{ pickerAlias | ncNodeName }}
    

    (This will be bundled in the next release of NestedContent - release date unknown)

    But that is for single content pickers. For multiple pickers, you'd need to modify the filter to loop over the node IDs and names.

    I hope this helps?

    Cheers,
    - Lee

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Nov 14, 2016 @ 10:04
    Michaël Vanbrabandt
    0

    Hi Lee,

    so I need to create a new plugin with a package manifest that contains only the js file of the angular filter?

    /Michaël

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 14, 2016 @ 10:06
    Lee Kelleher
    1

    Yeah, or any way to inject the JS into the back-office. New package.manifest is the easiest way.

    Matt wrote a 24days post about that too: http://24days.in/umbraco/2015/umbraco-7-back-office-tweaks/

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Nov 14, 2016 @ 10:11
    Michaël Vanbrabandt
    0

    Thanks Lee!

    Will try this out!

    /Michaël

  • Alan Mac Kenna 147 posts 405 karma points MVP c-trib
    Jan 11, 2018 @ 11:43
    Alan Mac Kenna
    0

    This filter works nicely for MNTP with a single item for Stacked Content too, thanks Lee & Matt!

  • Antony Meyn 2 posts 71 karma points hq
    Oct 19, 2017 @ 10:32
    Antony Meyn
    0

    How do I get the name of a Multinode tree picker?

    What if I have a multinode treepicker? In my image below, I would like the name Test to appear instead of Item 2

  • Natalia Babchinskaya 1 post 20 karma points
    Feb 07, 2018 @ 14:36
    Natalia Babchinskaya
    0

    Guys, what's wrong if input in filter is undefined?

    return function (input) {...

    In this part of js code

Please Sign in or register to post replies

Write your reply to:

Draft