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
Hey Guys I have a problem with reading out my related links list. I tried debuging it and i found out that itemSelection (the array) is empty.
This is my code:
int worldOfWorkNodeId = 1138; var worldOfWorkNode = Umbraco.TypedContent(worldOfWorkNodeId); @{var itemSelection = worldOfWorkNode.GetVortoValue<JArray>("linklist");} @if (itemSelection != null) { foreach (var linkitem in itemSelection) { var linkUrl = (linkitem.Value<bool>("isInternal")) ? Umbraco.NiceUrl(linkitem.Value<int>("internal")) : linkitem.Value<string>("link"); var linkTarget = linkitem.Value<bool>("newWindow") ? "_blank" : null; <li><a onclick="scrollToElem()" href="@linkUrl">@(linkitem.Value<string>("caption"))</a></li> } }
Thanks in advance, Tim
Hi Tim, are you using latest Umbraco version?
Can you show all razor code?
Thanks,
Alex
I am using 7.6.6 And i posted all the code that I have to read out the related link list
Hi Tim
Did you solve the issue?
I decided to try a different way of solving my problem. I know that it works with propertyValue but i haven't found a way yet to get the contents out of a Vorto Relatedlink list.
What about Property Value Converters is it enabled in your solution?
Try this code:
worldOfWorkNode.GetValue<JArray>("linklist");
Is it working without Vorto Helper?
In latest Umbraco this code should work:
var itemSelection = worldOfWorkNode.GetPropertyValue<RelatedLinks>("linklist");
Read more: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Related-Links2
Try this ,
@foreach (var a in ((Newtonsoft.Json.Linq.JArray)item.GetVortoValue("importantLinks")))
I was able to get values by doing this.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 7.6.6 Related links vorto problem
Hey Guys I have a problem with reading out my related links list. I tried debuging it and i found out that itemSelection (the array) is empty.
This is my code:
Thanks in advance, Tim
Hi Tim, are you using latest Umbraco version?
Can you show all razor code?
Thanks,
Alex
I am using 7.6.6 And i posted all the code that I have to read out the related link list
Hi Tim
Did you solve the issue?
Thanks,
Alex
I decided to try a different way of solving my problem. I know that it works with propertyValue but i haven't found a way yet to get the contents out of a Vorto Relatedlink list.
Hi Tim
What about Property Value Converters is it enabled in your solution?
Try this code:
Is it working without Vorto Helper?
In latest Umbraco this code should work:
Read more: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Related-Links2
Thanks,
Alex
Try this ,
@foreach (var a in ((Newtonsoft.Json.Linq.JArray)item.GetVortoValue("importantLinks")))
I was able to get values by doing this.
is working on a reply...