尝试获取给定文档类型的孩子,但 umbracoNavihide 未设置为 false:
以下产生正确的输出。
@foreach (var child in root.Children.Where("ContentTypeAlias == \"DocumentTypehere\""))
{
if (child.umbracoNaviHide == "False")
{
continue;
}
<li>@child.Name</li>
}
这不会:
@foreach (var child in root.Children.Where("umbracoNaviHide == @0 && ContentTypeAlias == \"DocumentTypehere\"","False"))
{
<li>@child.Name</li>
}