Can anyone explain this irregular behavior?
I want to populate a sitemap with a PageDataCollection. When the PDC is populated with a PageTreeLoader all pages render perfect in the sitemap:
SiteMapData = ptl.GetPageTree( MyPage, CurrentPage.PageLink, Global.EPDataFactory);
SitemapControl.DataSource = SiteMapData;
SitemapControl.DataBind();
But when the PDC is populated in this way nothing renders in the sitemap:
SiteMapData = GetChildren( MyPage );
SitemapControl.DataSource = SiteMapData;
SitemapControl.DataBind();
I look into the PageDataCollection with the debugger and all the pages are there, so there are pages in the collection when the DataBind occurs.
I really like to work with my pages in the latter way, because i'm want to merge two collections together and can't get that part to work with the PageTreeLoader.
Thnx in advance,
Johan
A small correction to the first example:
PageTreeLoader ptl = new PageTreeLoader();
SiteMapData = ptl.GetPageTree( MyPage, CurrentPage.PageLink, Global.EPDataFactory);
SitemapControl.DataSource = SiteMapData;
SitemapControl.DataBind();
SiteMapData = ptl.GetPageTree( MyPage, CurrentPage.PageLink, Global.EPDataFactory); SitemapControl.DataSource = SiteMapData; SitemapControl.DataBind();
But when the PDC is populated in this way nothing renders in the sitemap:SiteMapData = GetChildren( MyPage ); SitemapControl.DataSource = SiteMapData; SitemapControl.DataBind();
I look into the PageDataCollection with the debugger and all the pages are there, so there are pages in the collection when the DataBind occurs. I really like to work with my pages in the latter way, because i'm want to merge two collections together and can't get that part to work with the PageTreeLoader. Thnx in advance, Johan