Search for pages

Vote:
 
Hi. I've created an import routine, and this routine creates pages. These are only saved, and not published. In the routine, I need to check if the page already exists in EPiServer. If so, I need to refresh data or maybe not import the page at all. I've tried searching with both GetChildren and FindPagesWithCriteria, but they both give me the problems. When searhing with GetChildren, custom properties on pages that are not published, is null. When searching with FindPagesWithCriteria, unpublished pages are not even returned. I've requested this earlier as a feature (propertycriteria for returning pages on a given status...). What (if possible) is the best way for searching and looking up unpublished pages? Thanks, Frank :)
#12107
Jul 10, 2004 18:08
Vote:
 
Hi frank! This is surely too late with an answer, but maybe others have the same problem. Try to call FindPagesWithCriteria with AccessControlList.NoAccess, e.g.: FindPagesWithCriteria(Global.EPConfig.StartPage, pcCollection, AccessControlList.NoAccess) :-) Bård Nymoen BEKK Consulting
#13663
Oct 22, 2004 12:43
Vote:
 
Thanks. I ended up finding the the pages with PageDataCollection oPages = Global.EPDataFactory.FindPagesWithCriteria( parent, coll, EPiServer.Security.AccessControlList.NoAccess); And then, afterwords I need to loop through all pages in the collection with this, to be able to retrieve data in the custom properties: PageReference correctRef = new PageReference(page.PageLink.ID, true); PageData reloadedPage = Global.EPDataFactory.GetPage( correctRef, EPiServer.Security.AccessControlList.NoAccess); if(reloadedPage != null) SaveProductToArray(reloadedPage); Frank :)
#13664
Oct 22, 2004 13:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.