Show All Sites User Has Access to In SharePoint 2007
- XML web services
- SharePoint Designer
Add XML Web Service as a Data Source to Site Collection
- Open SharePoint Designer 2007
- Connect to site collection root
- If Data Source Library is not visible
- Menu bar > task panes menu > data source library
- In the Data Source Library > expand XML Web Services
- Click on connect to a web service
- In the Data source Properties popup box, type in the address to the search web service http://YOUR SITE COLLECTION HERE/_vti_bin/search.asmx?WSDL
- Click on “Connect Now”
- Change operation to QueryEx – this will return an actual Data Set, not a blob
- Click on the Modify button below Parameters
- In the popup enter your query xml – I have an example below (Watch quote marks when cutting and pasting from WordPress > OK
- Will return everything, including docs, list items – limited to 1000 items
- NOTE: for SharePoint 2010 it is very similar, but for some reason MS decided you would have to escape the characters in the query.
|<QueryPacket xmlns=’urn:Microsoft.Search.Query’><Query><SupportedFormats><Format revision=’1′>urn:Microsoft.Search.Response.Document:Document</Format></SupportedFormats><Context><QueryText language=’en-us’ type=’MSSQLFT’>select title, path, Description from scope() where (contentclass = ‘STS_Web’ or contentclass = ‘STS_Site’) and path not like ‘%ssp/admin%’ order by title</QueryText></Context><Range><StartAt>1</StartAt><Count>1000</Count></Range></Query></QueryPacket>|
To Export As A Web Part
- Click on the WebPartPages:DataFormWebPart to make it active
- File > Export > Save Web Part To > Site Gallery
- Change title, add description and click ok
- Now go to a page to which you can add web parts > click on edit page
- Click on the Add Web Part link in the area where you want in to display
- Your custom web part should appear under the Miscellaneous section with the title and description specified.
- Click on the add button and Voila!
- Add some finishing touches with css, etc. as you prefer!