Sharepoint 2010 Subsites webpart

You may also like...

35 Responses

  1. Ken says:


    Should the Subsites webpart automatically update to include newly added sites?



    • Arild Aarnes says:

      Yes the webpart should automatically update to include new subsites.
      The webpart should show every subsite that the user have permissions to access.

  2. Anoop says:

    That worked well on my office 365 site. Thanks man!!

  3. Waldemar says:

    Hi Arild,

    Thanks for creating this webpart, it works fine.
    However, the images will not show (bullet and team site icon etc.)
    The HTML in the page source for these images also seems to be wrong/empty:

    Any idea how I can fix this?

    Many thanks,

    • Arild Aarnes says:

      Hi, the webpart should use the built-in Sharepoint images for this. It’s supposed to show the images from /_layouts/images/docicon.gif and the bullet would be /_layouts/images/square.gif
      So you should verify that those files exists in http://<your site URL/_layouts/images folder


  4. Daniel says:


    For expediency I simply tried install via the solution gallery

    This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution ‘5758fde1-f281-4a43-9682-ac1203f38632’ failed validation, file manifest.xml, line 10, character 4: The element ‘Solution’ in namespace ‘’ has invalid child element ‘TemplateFiles’ in namespace ‘’. List of possible elements expected: ‘FeatureManifests, ActivationDependencies’ in namespace ‘’.

    I guess I need to follow the install instructions via powershell and stsadm

  5. Kalona says:

    Awesome thanks, have it working like a charm in my master page (needed separate sub site nav to the quicklaunch)

    Just got to work out how to style it now!

    Thanks again

  6. Adam says:

    New to Sharepoint. I would really like to use this. I downloaded and did everything in the instructions. It appeared, from ps that it was deployed. Couldn’t find the part anywhere in the system to add it to a page. At a complete loss at what else to try so I completely removed it from the system.

    • Arild Aarnes says:

      The webpart is installed as a feature. Check Site Collection Features under Site Settings and make sure the feature is activated.

  7. Jason says:

    Would love to get an uploadable .DWP or .WEBPART. Leveraging Microsoft’s 365 doesn’t give me access to install webparts at the site collection level.

    I can however upload a .DWP or .WEBPART file.

    Any chance you can make one available for download on your site?

    Thanks in advance.

    • Arild Aarnes says:

      The original webpart would not run on Office 365 because of some code used that is not allowed in a sandboxed solution.
      I have compiled a new version that will run on Office 365. It’s basically the same project but I changed a few code lines and compiled it as a sandboxed solution.
      I just testet it on Office 365 and it seems to be functioning fine. I only tested for a few minutes though so please let me know if there’s any problems.
      You can download from the following link Subsites Webpart for Office 365
      This is a ZIP file containing the WSP file that can be installed on Office 365. Go to Site Settings and Solutions on your Office 365 site to install. Remember to Activate the Solution before trying to add the webpart.
      I will post an article later that explains in more detail the steps necessary to install the sandboxed solution on Office 365.

      • Jason says:

        Awesome. Thanks so much! I have it up and running on a sample site. I appreciate all of your efforts!

  8. Jason says:

    Anyway to get this file in .DWP or .WebPart format? I want to leverage MS’s 365 SharePoint 2010 solution, but I don’t have access to STADMIN and the likes to install this for the entire “Site”. Rather I do have access to upload the .DWP or .WEBPART file. Any chance you can post that for download?

    Thank you kindly in advance.

  9. Dean says:

    Installing the web part using the CAB file worked fine. Seems to be functioning as expected. Thanks for your help and for creating this WP.

  10. Dean says:

    Downloaded the cab file and installed fine. Seems to be be working as expected. Thanks for all of your help and effort on creating this WP.

  11. Dean says:

    In the above dialogue, everyone is referring to the ZIP file containing the WSP file. When I download and unzip I get an MSI ont a WSP. I ran the installed and it indicates it is installed but what is the installer actually doing?


    • Arild Aarnes says:


      You probably downloaded the webpart for MOSS 2007, that does contain a MSI file.
      The one for Sharepoint 2010 contains an WSP file and you can download that here

      • Dean says:

        Thanks fot the quick reply.

        I need the Moss 2007 version that is why I downloaded it. Can you clarify the procedure for the MSI? I know what to do with a WSP but not sure what the MSI is actually doing in the background.

        Thanks again.

        • Arild Aarnes says:

          The MSI file for MOSS 2007 is created by using the WPPackager tool from microsoft. This tool is used for creating easy installation of webparts for the older Sharepoint versions.
          When you run the MSI file on the Sharepoint server it will let you choose to deploy only to specific Virtual Servers or you can deploy to all Virutal Servers on the server. The MSI will install all necessary files for the webpart and update the SafeControls list (in sharepoint’s web.config) allowaing the webpart to run.
          you can find more detailed information about the MSI created with WPPackager here

          • Dean says:

            I do not received any prompts to choose a Virtual Server as you indicate. It indicates that it is installing and after 10 seconds it dissapears. No further prompts or error messages. It shows up in Programs and Features (WinServ2008) but I don’t see it updating anything. Web.config is untouched. I am full admin on the 2008 server and Sharepoint Admin.

            And the WSP from the 2010 version will not work on 2007 for sure?

            Any suggestions? Thanks.

          • Arild Aarnes says:

            Hi again,
            I’m not sure why the install is not working. I’ve installed it on many servers and usually had no problems.
            You could try to do a more manual install using STSADM.EXE to install the CAB file with the solution. You can download a ZIP containing the CAB file here.
            This is the same CAB file that WPPackager put into the MSI file you downloaded earlier.

            • Unpack the ZIP file somewhere on your Sharepoint server. Tha ZIP file contains one file,
            • Run STSADM.EXE on your Sharepoint 2007 server with the following parameters:
            • stsadm -o addwppack -filename -url http://your_Sharepoint_Portal_url_here -globalinstall -force
            • Then run ISSRESET to restart your webserver

            This should install the webpart on your Sharepoint server and it should be available when you try to add it to any page on your portal.

            As far as installing the 2010 WSP on a Sharepoint 2007 server I’m not sure. I don’t have a Sharepoint 2007 server available at the moment to try this.

  12. Hi there,

    Thanks for writing the Subsites tool. I downloaded it and it and in the zip file I found only subwebp.wsp? The file loaded succesfully but when I want to add it to a page I get:

    Display a list of subsites
    The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML.

    Any Idea’s on where to look?



    • Arild Aarnes says:

      Hi, are you installing this webpart on Sharepoint 2007 or Sharepoint 2010?
      the webpart is for Sharepoint 2010 and installing it on 2007 might give an error message like that.

      If you need a version for Sharepoint 2007 you can download this one. It’s the same subsites webpart but for Sharepoint Service 3.0 and Microsoft Office Sharepoint Server (MOSS) 2007

  13. Shahab says:

    Can the list be sorted by date created?

    • Arild Aarnes says:

      The list of subsites is displayed in the order it’s returned from the GetSubwebsForCurrentUser method. I’m not sure if the the sites are sorted by created date by default.
      If not it would be possible to do so but the webpart does not have this option today.
      I will post the source code in the near future so if anyone want’s to add this functionality they may do so.

  14. jflegras says:


    Is your sites list filtered with user rights ?

    • Arild Aarnes says:

      Yes. It uses the GetSubWebsForCurrentUser method of the SpWeb object. This will only show subsites of which the current user is a member.

  15. chinkul says:


    I used the webpart and deployed it to SP 2010 successfully. I am not able to see the new webpart in the gallery or in the webparts list when i try to add it to a page.
    am i missing something?


    • Arild Aarnes says:

      Hi, the webpart should show up under the Custom category when you try to add it to a page. Or at least it does on my site, see this screen shoot.

      • Justin M says:

        Hey. I’m having the same problem. Not showing up anywhere, and no custom category under webparts. Tried the add solution through powershell, and tried the 365 sandboxed file through adding solutions page. On Powershell I get no errors, and on the sandboxed solution page it adds but doesn’t let me activate.

        Really need this webpart, so any help would be really appreciated. I have a fresh install of Sharepoint 2010 Foundations. Thanks

  1. October 7, 2010

    […] This post was mentioned on Twitter by C Correia de Araujo, Sharepoint247. Sharepoint247 said: Free show #sharepoint subsites webpart available for download […]

  2. January 3, 2011

    […] Code January 3, 2011 By Arild Aarnes This article contains the source code for the Sharepoint Subsites webpart that can be downloaded […]

  3. August 2, 2011

    […] Webpart for Office 365 August 2, 2011By Arild AarnesThe SubSites webpart we have available as a free download will not run on Office 365, this is because it is not […]

  4. April 2, 2012

    […] as a free download April 2, 2012By Arild Aarnes Print PDF There is now an updated version of the subsites webpart available for download.The new version, version 1.5, adds sorting functionality and you can also […]

Leave a Reply to Dean Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.