Collections
.Children 子节点
1
- 2 @foreach(var item in Model.Content.Children)3 {4
- @item.Name 5 }6
.Ancestors 返回当前页面的所有祖先(父页面,祖父母等)
1
- 2 @*Order items by their Level*@3 @foreach(var item in Model.Content.Ancestors().OrderBy(x => x.Level))4 {5
- @item.Name 6 }7