List SharePoint Pages from Another SP Site

We are in the midst of a rollout of a SharePoint intranet.  It comes after an initial rollout of SharePoint that create team sites across the organization.  While it would have made sense to connect the two more closely, it means that our team has content that is already create and public on one SharePoint site and now we want to surface it on the other.  The default Web Page web part needs to be tweaked to accomplish this.

The Web Page web part is found in the search-driven Web parts.

Web parts based on the search will enable you to edit the search query.
Web parts based on the search will enable you to edit the search query.

I am growing to appreciate the search Web parts because of this ability to edit SharePoint search queries.  If your search is properly configured, it should allow you to fine tune the results that you retrieve in a Web part.

In my case, I added the Web part and then immediately edited it.  At the top of the properties area of the dialog that pops up, there is a button that says change query.  That’s where you can tweak this.  By default it will look at the current SharePoint site and you can set it to look at the current SharePoint collection as well.

However, the current site and collection were on server with a URL of A.  Our already-developed content was on the server at URL B.  So the defaults didn’t work for us.  Instead, I used the Specify a URL instead.


In my case, I wanted to list all of the Web Pages in a folder on server B.  By specifying the URL to http://serverB/sites/webcontent/Tutorials, it brought up all of the tutorial Web pages in a list.

It also brought up a bunch of other pages that are auto-generated by SharePoint.  In this case, because we are using the Wiki site for our tutorials on server B, there are also navigational pages:  by Author, etc.  I had to play around a bit to figure out how filter those out.

The easiest way is to use the Test tab of this interface.  By default, you land on the Basic tab.  Click on Test and then select the Show More link to see a more complete page of search options.  In particular, I wanted to see if I could use standard boolean search queries to filter out unwanted pages.

Since the Wiki is called Tutorials, all of the page cruft also had the word Tutorials – in it:  Tutorials – by Author, etc.  By adding:

-“Tutorials -“

as an additional search query on the Test tab, I could see that it removed all of the extraneous pages.

Unfortunately, anything that you do on the Test tab, stays on the Test tab.  When I returned to the Basic tab, I needed to type in the Add additional filters box, after {searchboxquery}, -“Tutorials -“ so that it would exclude pages with that string in their title.

It’s a much better solution for us, because we can leave the content in its primary and original home without having to duplicate and maintain it on two servers.

David Whelan

I improve information access and lead information teams. My books on finding information and managing it and practicing law using cloud computing reflect my interest in information management, technology, law practice, and legal research. I've been a library director in Canada and the US, as well as directing the American Bar Association's Legal Technology Resource Center. I speak and write frequently on information, technology, law library, and law practice issues.