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
If I access a node with
var root = @Model.AncestorOrSelf(1);
How do I then loop through each row and access the cell contents?
This works:
foreach (var link in Model.socialMediaLinks) { <p>@link.icon - @link.name - @link.link</p> }
but this doesn't:
var root = @Model.AncestorOrSelf(1); foreach (var link in root.socialMediaLinks) { <p>@link.icon - @link.name - @link.link</p> }
Why?
Hi Gordon,
What if you try this one:
var root = Model.AncestorOrSelf(1);foreach(var link in root.socialMediaLinks){ <p>@link.icon - @link.name - @link.link</p>}
Does it make any difference?
/Dennis
Thanks Dennis, that worked!! (I blame it on not having had lunch yet ;-)
Oh ... can someone un-mark this as the solution, as it should be the post above!!
I´m glad that I could help you out.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting to data without Model
If I access a node with
How do I then loop through each row and access the cell contents?
This works:
but this doesn't:
Why?
Hi Gordon,
What if you try this one:
Does it make any difference?
/Dennis
Thanks Dennis, that worked!! (I blame it on not having had lunch yet ;-)
Oh ... can someone un-mark this as the solution, as it should be the post above!!
Hi Gordon,
I´m glad that I could help you out.
/Dennis
is working on a reply...