SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know the best way to display a listing of sites within a Site Collection using a Content Query Web Part?

I know that you can query content types but what would be the best way to show sites?


share|improve this question
up vote 0 down vote accepted

SiteDirectory for SharePoint 2010 from CodePlex gives you a site listings list. You can download the code from CodePlex

share|improve this answer
Nice thanks for the suggestion – MichalPisarek Jun 8 '10 at 1:03

Another option I've been looking at very closely lately is configuring the search results web part to execute a set query filtering down to the STS_Site and STS_Web objects. This would automatically filter out the sites the user doesn't have access to and wouldn't need to be maintained. The XSLT used to create the display is completely customizable so a meaningful display can be created and re-used.

share|improve this answer
Great idea Mike! I might to give it a shot – MichalPisarek Jun 8 '10 at 1:04

a good route for me was using the table of contents web part. best thing about it is it inherits target audiencing. if needed, hide any subsites in site settings - navigation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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