Retreive content.picker Name with Custom List View
Hi, we have a joblist doctype. In this type you can choose a location(content.picker). We would like to use a custom List View in umbraco to also show this location on the list. How do we need to configure the template for this location on the custom list view? When we use {{Name}} we get a usb link displayed instead of the Name.
Yes. The picker stores the data as a link and not text. To turn it into text you need to create a javascript function to look it up for you, but this needs to have quite agressive caching (I forget exactly why - but it's something to do with it being inside a loop so it get's looked up loads). Luckily I had a discussion about this a while back and I've got some code somewhere. I'll have a look and I'll find it for you.
Retreive content.picker Name with Custom List View
Hi, we have a joblist doctype. In this type you can choose a location(content.picker). We would like to use a custom List View in umbraco to also show this location on the list. How do we need to configure the template for this location on the custom list view? When we use {{Name}} we get a usb link displayed instead of the Name.
Anyone?
Yes. The picker stores the data as a link and not text. To turn it into text you need to create a javascript function to look it up for you, but this needs to have quite agressive caching (I forget exactly why - but it's something to do with it being inside a loop so it get's looked up loads). Luckily I had a discussion about this a while back and I've got some code somewhere. I'll have a look and I'll find it for you.
There's a really good example by Matt B here:
https://gist.github.com/mattbrailsford/d7f512ca4a6f24ebe70ebed82eb163f5
linked from this thread
https://our.umbraco.com/packages/backoffice-extensions/nested-content/nested-content-feedback/81260-name-template-show-name-instead-of-id#comment-259762
also a bit more here
https://our.umbraco.com/packages/backoffice-extensions/nested-content/nested-content-feedback/84214-function-for-label-templates
where i asked a similar question and got some great answers
thanks
is working on a reply...