I’m trying to create a Custom UFM Filter and I need to get a Content from its UUID. Let’s just say it’s very much related to this question…
Inside the filter() method of my class that extends UmbUfmFilterBase I have no idea how to get the Content from the supplied value — I can’t find any examples of how to do this; if anybody knows how it’s done, or can point me to some documentation I’d be very happy!
I don’t think a UFM filter is the right place for this. Filters are synchronous value transformers, so for repository lookups I’d use a custom UFM component that renders a custom element.
In that element you can use UmbDocumentItemRepository.requestItems([unique]). If the value is a UDI from Contentment, convert it first with getGuidFromUdi() from @umbraco-cms/backoffice/utils.
Thanks a lot - I’ve never understood why there are both “Components” and “Filters”; I bet to the vast majority they’re just two different syntaxes, but your explanation makes sense and I’ll try the component route instead and see where that gets me.