Copied to clipboard

Flag this post as spam?

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

  • Damien Holley 92 posts 330 karma points
    16 days ago
    Damien Holley

    Get dropdown selection in nested content template (AngularJS)

    Hi does anyone know of a way to get the string value of a dropdown selection in the template area of nested content? I will be using this to identify the nested content entries.

    here's what I have, the if statement works fine, but I keep getting [id] if I use region.

    {{region == "" ? "All" : getById(region)}}

    I wish to use this in the below highlighted area:

    enter image description here

  • Marc Goodson 1283 posts 8694 karma points MVP 5x c-trib
    16 days ago
    Marc Goodson

    Hi Damien

    There is a way to show the Node Name in the nested content title for a content picker instead of the id, using a special custom Angular filter that is in the core.

    {{ pickerAlias | ncNodeName }}

    But if you have a 'dropdown' then that is different - But you could implement your own custom AngularJS filter and add it to the Umbraco backoffice using a package.manifest file, and adding it to the umbraco.filters modules - to perform the lookup of the name...

    ... have a look at the implementation for the ncNodeName filter:

    that would give you an idea of what's involved, and where to start!



  • Damien Holley 92 posts 330 karma points
    5 days ago
    Damien Holley

    Thanks Marc, not exactly what I was looking for and it means Umbraco doesn't use the SOLID principles, as the responsibility is external which worries me.

    I may have to go with your advice on this one as I can see no oither way around it.


Please Sign in or register to post replies

Write your reply to: