I recently found out about a new method in EPiServer CMS 5 R2, the GetDescendents method. It returns all children to a page, not just level one children like the GetChildren method, but all children.
The code is really easy:
EPiServer.DataFactory.Instance.ProviderMap.GetPageProvider("MyPageProvider").GetDescendents(PageReference.StartPage);
Or just go the fast way:
EPiServer.DataFactory.Instance.GetDescendents(PageReference.StartPage);
You can see the SDK entry here.
And the best part is that it returns an IList<PageReference> and not your normal PageReferenceCollection. Could this be a new era in EPiServer? I for one would welcome the change from PageDataCollections to IList<PageData> or IEnumerable<PageData>. Specially now with LINQ and all you can do with generic lists.