Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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> }
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
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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
Hi Tom,
What you could do is make a test with the content picker
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
is working on a reply...