[Solved] Block List Multi-Url Picker label - how to get picked node name?
r
I'm trying to show the value of a Multi-URL picker from a block list. I've looked at @Joe Glombek docs here (thanks Joe! https://joe.gl/ombek/blog/umbraco-angularjs-filter-cheat-sheet/ I can get the 'title' from the picker by using myURLPicker[0].name However I want the actual node that's been picked, the 'link' In the API it comes back as 'destinationId', but that doensn't work here. Any ideas please?
l
So my best guess would be that the page id is being saved, and as youre after the url, you would need a custom umbraco filter, on the page linked above (https://joe.gl/ombek/blog/umbraco-angularjs-filter-cheat-sheet/), check out the 'Writing your own' title, that is how I have achived the same result i believe youre after
r
Thanks Lewis, the problem is I can't even get the Id
a
ah I know this!
You can do something like this: {{myPropertyAlias | ncNodeName}}
replace mypropertyalias with your propertyname, so myUrlPicker
basically, it means: take the nodename of your selected property
r
thank you. Unfortunately comes back with the name of my Block content model! 😕
a
Hmm thats odd
r
just so I make sure i'm doing it right {{navigationLink[0].name}} returns the title of the Multi URL Picker {{navigationLink | ncNodeName}} returns the name of my BlockList ?
a
{{navigationLink[0] || ncNodeName}} ?
r
Solved 🙂 Note quite what you typed @Ambert but helped me get there, so thank you. {{navigationLink[0]}} returned (very helpfully!) : icon":"icon-notepad color-black","name":"Title of the link","nodeName":"Contact Us","published":true,"queryString":null,"target":null,"trashed":false,"udi":"umb://document/4f89f9e4153b4be68c11b3e0376b00a6","url":"/europe/about-us/contact-us: So the answer for me was: {{navigationLink[0].nodeName}} Thank you @ambert @Lewis Heaton and @Joe Glombek
a
ah! Ofc
You have a multi link picker
Iw as thinking of the Multinode Treepicker 🙂
my bad
r
Helped me get the answer so all good, thanks again! 🙂
s
Ps. code blocks are awesome, they can even have syntax highlighting, to make it really Pop! 😉 https://gist.github.com/webermn15/47e3fb4ccadf8ac3cf66ee9011a507f5#code-blocks
286 Views