A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Change Getchildern to FindALLPagesWithCriteria or use filter ?

Vote:
 

hi

Read some post about the problem with getchildern returns all pages regardless of access or publish,

what is the correct method ( or at least the correct/best/fastest) to filter these results.

most of the time i need the access right to kick in but most of the time i don't want the publish

 

#35834
Dec 30, 2009 14:19
Vote:
 

PageData pd = DataFactory.Instance.GetPage(new PageReference(3));
PageDataCollection children = DataFactory.Instance.GetChildren(pd.PageLink);

// And then filter like this:
FilterForVisitor.Filter(children);

#35940
Jan 07, 2010 21:17
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.