문제

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top