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.
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:
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.
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.
I wish to use this in the below highlighted area:
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.
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:
https://github.com/umbraco/Umbraco-CMS/blob/ba73ad57927f461fd3f6d1160078a0003522ec30/src/Umbraco.Web.UI.Client/src/common/filters/nestedcontent.filter.js
that would give you an idea of what's involved, and where to start!
regards
marc
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.
Cheers!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.