Copied to clipboard

Flag this post as spam?

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


  • Jon 92 posts 166 karma points
    Jun 09, 2021 @ 09:33
    Jon
    0

    GetPreValueAsString in version 8

    Does anyone know what has been replaced in Version 8 that can still get the same out of GetPreValueAsString ?

    I have this line of code in Version 7 and need it converted to 8:

    ret.Add(property.Alias, content.Value<int[]>(property.Alias).Select(s => umbracoHelper.GetPreValueAsString(s)).ToArray());
    

    Thanks

    Jon

  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Jul 27, 2021 @ 19:10
    Søren Kottal
    0

    Hi Jon

    IIRC the prevalue is now returned by default instead of the id, so you should be able to do

    ret.Add(property.Alias, content.Value<IEnumerable<string>>(property.Alias).ToArray());
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies