I have a page type that includes a content picker (Contentment DataList ) that stores the selections as the page Id. it allows multiple items to be picked.
I have created a custom List View and added the “Categories” property with the template “{{ value }}” and it shows values like
["10309"]
But I would like it to show the category name, e.g. “Books”.
It’s possible if you use a standard Umbraco content picker or multinodetreepicker. Is there a specific reason you use contentment for what Umbraco can already do out of the box?
Thanks for the links, but I’m struggling to get anything to work.
If I want to call my filter “shopCategoryName” and the category picker alias is “categories”, would the template be "{{ categories | shopCategoryName }}"?
I tried copying the code for “ncNodeName” and changing the filter name to “shopCategoryName” but it didn’t work - if I debug it in the browser, it doesn’t seem to receive any values.
Can you explain how I get the categories picker value into the filter code (show me a basic filter template?), then maybe I can manage the rest!
@gordonsaxby - Is it possible for your custom DataList source code to store a UDI rather than the Node Id? That will guarantee an unchanging ID value, even if you end up with a multiple-environment setup. It might also make your Angular filter easier to write, since I believe you’d be able to use the built-in Umbraco ncNodeName filter as a template (as per Jesper’s comment with link).
Yes, I can change the ID to be UDI … but I’m still struggling to write the filter itself - or specifically get the ID value(s) into the filter function.