我正在尝试创建一个查询,返回根据页面设置标记相同的所有项目。
这是我目前为止的疑问
var selectLeftNav = Model.AncestorOrSelf()
.Children<ContentPage>()
.Where(x => x.IsVisible())
.Where(x => x.LeftNavigationSection == Model.Value("leftNavigationSection"));
<ul class="nav left-nav-items">
@foreach (var item in selectLeftNav)
{
<li class="nav-item"><a href="@item.Url()">@item.Name</a></li>
}
</ul>
Model.Value("leftNavigationSection")的值来自下拉菜单
为了让任何人都能提供帮助,您应该提供尽可能多的详细信息: