Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Remko 118 posts 283 karma points
    Jul 29, 2021 @ 09:59
    Remko
    0

    ValueConverter doesn't seem to work for ContentPicker in Umbraco 8.15 ?

    When trying to get picked value from property, it returns null as you can see..., although there is UDI

    In Umbraco backoffice it shows selected node.. But in code it doesn't seem to convert Udi to IPublishedContent and simply returns null..

    btw, also tried: .Value<>

    Can anyone help me with this? Don't want to use any workarounds where I would first need to get Udi and then get IPublishedContent with this. Would really want Value

    Thanks!

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Jul 30, 2021 @ 09:02
    Marc Goodson
    0

    Hi Remko

    The bit you've also tried isn't displaying in your message above... so I'm probably going to suggest the same thing!

    eg. is it a multiple content picker and therefore the property value converter is returning a list of picked items and you'd need instead:

    .Value<IEnumerable<IPublishedContent>>("umbracoRedirect")
    

    or you can make the picker a single picker, as that makes more sense here?

    But apologies if I've just suggested the thing you have already tried!

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft