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?
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()).
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.
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?
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()
).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.
is working on a reply...