I'd like to show documents and pages from the libraries of a local publishing site together on the same page.

It seems the out of the box web parts only allow you to show one or the other (in different configurations).


There are many options for accomplishing this - obviously if you are able to write/deploy custom code you can effectively do whatever you like. In terms of a more out-of-the-box approach, I'm guessing the limitation you ran into is that something like the Content Query web part can only fetch items from one list type at a time. So, some options could be:

  • Use multiple Content Query web parts on your page (e.g. in the same web part zone)
  • Write a custom control which uses SPSiteDataQuery to fetch results, enabling you to fully control the query and presentation
| improve this answer | |

As with custom code, the Data View Web Part (DVWP) lets you effectively do whatever you like. Assuming that the documents and pages have some sort of relationship to each other (otherwise two separate List View Web Parts would be fine), you can create a Linked Data Source to "join" the two sources.

Also, the DataSourceMode="CrossList" allows you to roll up content from multiple lists and libraries.

If any of these ideas appeal to you, I have lots of bits and pieces on my blog.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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