Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个文档类型别名为“条目”的节点,它被创建为许多不同根页面和子页面的子节点,有没有办法获得创建的“条目”类型节点的总数并显示在剃刀视图中乌布拉科?
是的,当然,对于 v7 使用:
Model.Content.Site().Descendants("entry").Count()
对于 v8
@Model.Root().DescendantsOfType("entry").Count()