Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
Can anyone tell me if TypedContent works with a list of UDis?
Thanks
Paul
Hi
No it doesn't at the moment, it only excepts lists of either Ids or Guids (which are the end of UDIs).
you either have to do something with the udi values.
I am not sure but you might be able to extract the guids of the UDIs:
var guids = udis.Select(x => ((GuidUdi)x).Guid); Umbraco.TypedContent(guids);
but that bypasses some of the UDI goodness. so it might be better to loop them ?
var items = new List<IPublishedContent>(); foreach(var udi in udis) { var item = Umbraco.TypedContent(udi); if (item != null) { items.Add(item); } }
Thanks Kevin, and what would be to angular version of this, if any. I need to update my grid controls.
I thought I could use entityResource.getById(udi, "Document")
but it doesn't seem to work.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
TypedContent with List of UDI's
Hello,
Can anyone tell me if TypedContent works with a list of UDis?
Thanks
Paul
Hi
No it doesn't at the moment, it only excepts lists of either Ids or Guids (which are the end of UDIs).
you either have to do something with the udi values.
I am not sure but you might be able to extract the guids of the UDIs:
but that bypasses some of the UDI goodness. so it might be better to loop them ?
Thanks Kevin, and what would be to angular version of this, if any. I need to update my grid controls.
I thought I could use entityResource.getById(udi, "Document")
but it doesn't seem to work.
Thanks
Paul
is working on a reply...