Copied to clipboard

Flag this post as spam?

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


  • Dan Evans 562 posts 881 karma points
    Mar 13, 2018 @ 15:56
    Dan Evans
    0

    Navigating Nested Content

    Using nested content is it possible to access properties such as IsLast().? I can't seem to get it to work. If not how does one get the next sibling of a nested content item whilst in a foreach loop?

  • Nicholas Westby 1702 posts 5619 karma points c-trib
    Mar 13, 2018 @ 16:55
    Nicholas Westby
    0

    Use a for loop instead of a foreach loop (because you know the index in a for loop). You may need to convert the collection to an indexable collection first (e.g., with .ToArray() or .ToList()).

  • Dan Evans 562 posts 881 karma points
    Mar 14, 2018 @ 07:21
    Dan Evans
    0

    This is what I suspected. Do you have a code snippet for this? It's a shame nested content is not as flexible as an actual document when it could just be a document within a document.

Please Sign in or register to post replies

Write your reply to:

Draft