Copied to clipboard

Flag this post as spam?

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


  • Stefan Arngrimsson 36 posts 59 karma points
    Mar 09, 2011 @ 12:26
    Stefan Arngrimsson
    0

    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

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Mar 09, 2011 @ 17:48
    Sebastiaan Janssen
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft