Fetch all pages

Vote:
 
I need to create a selectbox populated with all pages. How can I get hold of the entire tree structure?
#12410
Oct 27, 2005 14:51
Vote:
 
You can use the PageTreeLoader PageTreeLoader ptl = new PageTreeLoader(); ptl.GetCompletePageTree(PageReference, Global.EPDataFactory)
#14219
Oct 27, 2005 16:12
Vote:
 
Thanks, Solves my problem
#14220
Oct 31, 2005 13:12
Vote:
 
Just beware that this will kill performance if the site has many pages. /Steve
#14221
Nov 03, 2005 20:16
Vote:
 
Is there a better way to do it?
#14222
Nov 04, 2005 11:50
Vote:
 
Not if you actually need all pages in your box (not sure what you mean by selectbox). If you've got a large site, displaying all pages at the same time will be rather hard to use for the visitor. So, not knowing exactly what you want to achieve, I cannot see a better way of doing this. Steve
#14223
Nov 05, 2005 18:49
Vote:
 
Use EPiServer.WebControls.InputPageReference if you need the user to select 1 page. /Håkan
#14224
Nov 07, 2005 8:59
* 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.