I want to have a list of all child sites on a page something like this:

  • Project 1
  • Project 2
  • Project 3

Where I worked before I ended up making a custom web-part to do this, and I'd rather not make a list that has to be manually updated.

Is there any way to do this in SharePoint Foundation 2010 automatically without having to make a custom web-part?

EDIT: This is exactly what data I want, but, I want that list view shown as a web-part, on another page. Can we do that without getting custom?


The Data View Web Part (DVWP) has a DataSourceMode="Webs" that will return a data set containing all of the sites in the Site Collection. It's custom in the sense that you do the work in SharePoint Designer, but there's not server-side code.

Another option is to use my SPServices jQuery library and the GetAllSubWebCollection operation from the Webs Web Service. Here you'd just drop some script either into the page or in a CEWP.

  • I don't see this option when using SP Designer ontop of SharePoint Foundation either. All I see for datasources for a data view web part are my normal site lists. – Dilbert789 May 20 '10 at 20:13
  • I haven't tried it in SharePoint 2010 yet, actually. But in SharePoint 2007, the DataSourceMode="Webs" option isn't exposed through SPD at all. You have to update the XSL manually. – Marc D Anderson May 20 '10 at 21:07

You should check out a dataview web part. You can create a dataview web part using the GetSite method for the SiteData Web service. This will pull a list of all sites within the site collection for you.

  • Is this packaged with SharePoint Foundation? I'm more looking for a 'non-custom' solution. – Dilbert789 May 20 '10 at 17:12
  • It is actually done from SharePoint designer. There is no coding required, but you do have to create the dataview web part from within that application. You would first create the data source as the web service, then just drag and drop it onto a page and change up the format the way you want it to look. – Lori May 21 '10 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.