Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    Apr 09, 2013 @ 02:03
    Tom
    0

    BUG - Content Node Picker using GetPropertyValue<int> still returns string?

    Hi All,

    trying to use Model.GetPropertyValue<int>("contentLink");

    and assigning it to a variable or passing directly in to umbraco.library.NiceUrl

     

    regardless of the type passed in it always returns a string. Surely this isn't correct behaviour?

     

    Thanks

  • Fuji Kusaka 2203 posts 4220 karma points
    Apr 09, 2013 @ 07:46
    Fuji Kusaka
    0

    Hi Tom,

    What you could do is make a test with the content picker

       @if(Model.HasValue("contentLink")){
                                                var url = @Model.NodeById(contentLink);                                   
                                                    <a href="@umbraco.library.NiceUrl(@url.Id)">Your Link</a>
                                            }
  • Mike Chambers 636 posts 1253 karma points c-trib
    Apr 09, 2013 @ 11:23
    Mike Chambers
    0

    what version of umbraco are you running... there was a bug in 4.11.5 that had all types returning strings.. fixed in 4.11.6

Please Sign in or register to post replies

Write your reply to:

Draft