Copied to clipboard

Flag this post as spam?

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


  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 31, 2017 @ 07:39
    Dirk De Grave
    0

    Get reference to content in context of property value converter

    Hi,

    As title suggests, trying to find out whether it's in any way possible to get a reference to the content while in the context of a property value converter?

    Or, if anyone would find a better solution to what we want to implement:

    For most cases, we rely on vorto-alike property value converter to get the value for current language, in rare cases we want to fallback to another language (which can be different depending on property and content), but decision what language to take depends on the content! So, is there any way to know what content we're dealing with in context of the value converter?

    Cheers,

    Dirk

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 31, 2017 @ 08:50
    Dirk De Grave
    0

    Oh, I can still access UmbracoContext.Current.PageId which is exactly what I need for now

    --Dirk

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 31, 2017 @ 11:08
    Dirk De Grave
    0

    Forget about my last comment, it won't work if you use the converter for multiple content during the same request (which happens most of the time)

Please Sign in or register to post replies

Write your reply to:

Draft