I've have been told that when you run the GetChildren method in CMS 5 you don't get the same result as you did in EPi4. What method can I use to get the same, filtered result?
The fun is that if you use GetChildren to fill a asp:repeater you won't get the same items/pages rendered as if you fill a EPiServer:PageList, ie:
PageDataCollection pages = DataFactory.Instance.GetChildren(CurrentPage.PageLink);
myRepeater.DataSource = pages;
myRepeater.DataBind();
myPageList.DataSource = pages;
myPageList.DataBind();
myRepeater will show all pages found by GetChildren, myPageList will make it's own filtering, for instance it removes unpublished pages. This is not an error, it's FYI :)
Found it!
http://www.episerver.com/en/EPiServer_Knowledge_Center/Documentation/Release-Notes---EPiServer-CMS-51/Breaking-Changes/Breaking-changes-in-the-DataFactory-APIs/
// Markus
PageDataCollection pages = DataFactory.Instance.GetChildren(CurrentPage.PageLink); myRepeater.DataSource = pages; myRepeater.DataBind(); myPageList.DataSource = pages; myPageList.DataBind();
myRepeater will show all pages found by GetChildren, myPageList will make it's own filtering, for instance it removes unpublished pages. This is not an error, it's FYI :)