Copied to clipboard

Flag this post as spam?

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


  • Jon 67 posts 141 karma points
    Mar 26, 2021 @ 16:33
    Jon
    0

    Alternative to GetPreValueAsString in Umbraaco 8

    Im trying to convert this code from umbraco 7 into Umbraco 8.

     var returnVal = "";
                var text = umbraco.library.GetPreValueAsString(LinksSubheading);
                switch (text)
                {
                    case "List Whole Alphabet":
                        returnVal =  "AZ";
                        break;
                    case "List Children Only":
                        returnVal =  "CAT";
                        break;
                    case "Hide":
                        returnVal =  "NONE";
                        break;
                }
                return returnVal;
    

    I cant find an alternative - any ideas?

  • Dhanesh Kumar MJ 99 posts 318 karma points
    Mar 26, 2021 @ 16:38
  • 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