简体   繁体   English

在多语言网站 Umbraco8 上获取页面的孩子

[英]Get children of page on multi language site Umbraco8

I have 3 languages on my site, and i am trying to get links for the navigation.我的网站上有 3 种语言,我正在尝试获取导航链接。

So from my frontpage, i am trying to get the children of that page.所以从我的首页,我试图得到那个页面的孩子。 But it asks about something called a predicate?但它询问了一个叫做谓词的东西?

i am using this:我正在使用这个:

children = currentPage.AncestorOrSelf<Frontpage>().Children();

how do i use the predicate?我如何使用谓词? I just need the children of the frontpage, so i can build a navigation.我只需要首页的孩子,所以我可以建立一个导航。

I have tried looking at the documentation, but have been unable to see a solution.我曾尝试查看文档,但一直无法找到解决方案。

So it seems it takes a lambda expression to sort the data.所以似乎需要一个 lambda 表达式来对数据进行排序。 Or i can just remove() and do .children Then i just get the children.或者我可以直接 remove() 并执行 .children 然后我就得到了孩子。 Guess thats a change from v7 to v8.猜猜那是从 v7 到 v8 的变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM