Show all subsites on a SharePoint 2010 page without code via SharePoint Designer

I was looking for an easy way to display a list of subsites in SharePoint 2010 and I couldn’t find it. It seemed you could only do that with some webparts or heavy use of custom code.

Then I found Michael Wilcox blog who explains how to do it in SharePoint 2007 and I decided to give it a try if it still works in SP2010.

The trick is simple: we are going to use the build-in webservice without writing a single line of code:

1)Open the site in SharePoint Designer.

2)Go to the Data Sources block and click on the button SOAP Service Connection

3)Add the link to your site in the field “Service description location” and add the part: _vti_bin/Webs.asmx?WSDL
This will give you a link like this:
http://yoursitecollection/sites/yoursite/_vti_bin/Webs.asmx?WSDL

4)Click the “Connect now” button: SPD automatically adds the select statement, the WebsSoap port and GetWebCollection (if not, choose these values)

5)Click “ok”

6)Go to the page where you want to add the list in SharePoint Designer. On the insert tab, add a Data View with the SOAP Services connection we just made
Done!

If you save the page and open it in your browser, you will see a list of subsites.

Optionally:
If you want the title to be clickable, click on the title and change the code

<xsl:value-of select="@Title">

To following code:

<xsl:element name="a">

<xsl:attribute name="href">

<xsl:value-of select="@Url"/>

</xsl:attribute>

<xsl:value-of select="@Title"/>

</xsl:element>

About: Marijn

Marijn Somers (MVP) has over 12 years experience in the SharePoint world, starting out with SP2007. Over the years the focus has grown to Office 365, with a focus on collaboration and document management. He is a business consultant at Balestra and Principal Content Provider for "Mijn 365 Coach" that offers dutch employee video training. His main work tracks are around user adoption, training and coaching and governance. He is also not afraid to dig deeper in the technicalities with PowerShell, adaptive cards or custom formatting in lists and libraries. You can listen to him on the biweekly "Office 365 Distilled" podcast.


8 thoughts on “Show all subsites on a SharePoint 2010 page without code via SharePoint Designer”

  1. Thanks very much! I’d been looking for this solution for some time. Works like a charm.

  2. SOAP Service Connection (nor any other service) is an option for me. Under Data Sources, all I have are the lists and libraries on the site. Any idea why? I’m a site collection admin, but have no more rights than that.

  3. Thank you! This solution works very well and it’s very easy. but it’s only list of the subsite, how about sub-subsite? or sub-sub-subsite?

    1. You will need a bigger script for that 😉
      I can’t really help you with that, but I am sure if you ask twitter “#sphelp” channel or some other forum, there will be people that will help you!

  4. It was going so well… until the part where you insert the data source. In SharePoint Designer 2013 there is no “Design View” – which I assume is how you did it. I tried adding it in “Code View” but got an error on the right hand side: “The serer returned a non-specific error”

    Back to google…

Leave a Reply

%d bloggers like this: