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,
I have this simple script :
@foreach(var page in @Model.Children) { @page.Name }
on my front page, @Model.Children.Count() returns 0
What am I doing wrong?
If i do @Model.Name outside the loop, then the name of the node is displayed correctly.
Best regards,
Stefan
I'm not sure what could be going on, your exact code works fine for me. I am using a newer build than RC though, so this might be a bug that has been solved already.
is working on a reply...
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.
Continue discussion
Nothing is displayed
Hi,
I have this simple script :
@foreach(var page in @Model.Children) {
@page.Name
}
on my front page, @Model.Children.Count() returns 0
What am I doing wrong?
If i do @Model.Name outside the loop, then the name of the node is displayed correctly.
Best regards,
Stefan
I'm not sure what could be going on, your exact code works fine for me. I am using a newer build than RC though, so this might be a bug that has been solved already.
is working on a reply...
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.