0

We have a site for each project in our site collection. Sometimes the projects have dependencies, like site A being a mobule being used in projects B (site B) and C (site C).

So in site B and site C, in some views you want to include documents from site A. I found a trick to include a view for only site A documents from site B, but not the desired list mixed from A and B documents.

How to create this one?

1

You don't specify in you question what mechanism you are using to associate project document dependencies, but assuming you are using metadata of some sort on your document libraries to indicate which project(s) they are associated with, I think your best bet is to use the Highlighted Content WebPart:

In the settings of your WebPart instance, under the "Content" subheading, the "Source" dropdown allows you to choose to roll-up content from just the current site, or "All Sites", or "Specific Sites" (which then gives you a multi-select to choose which sites to get content from. Then you can choose the type of content to roll-up, such as Documents, Pages, or Images -- in your case, you want to choose "Documents". Then finally, you can use the "Filter and Sort" options to just get those documents whose project-dependency metadata matches your criteria. If the simple filtering isn't sophisticated enough for your metadata needs, you can always choose "custom query" at the top and write a full CAML or KQL query.

5
  • Thank you for the answer. This looks like the way to go, but unfortunally the description doesn't seem to match our SharePoint Online version. I managed to create a page, but there is no green plus sign, just an empty editor. I can choose "Web part" from the "Insert" menu, but then there is a "Parts" browser with categories like "Apps", "Blog" and "Filters", but nothing like "Highlighted Content". I'm a bit lost, seems like the description is for a completely different product.
    – Philippos
    Jan 3 '20 at 8:12
  • Now I found a Webpart in category "Search-Driven Content" called "Items matching a tag". The description reads promising "When you add it to the page, this Web Part will show items from the current site matching the page navigation context. You can change this setting to show items from another site". Unfortunally, adding it gives an error "Sorry, something went wrong. An unexpcted error has occured" and some non-talking "Correlation ID". Stuck here.
    – Philippos
    Jan 3 '20 at 8:32
  • Sounds like you are using a Classic site in your SharePoint Online environment, instead of a Modern site. The available webparts on classic pages is significantly different. On a classic page, you'll want to use a [Content Query Web Part] (support.office.com/en-us/article/…).
    – willman
    Jan 3 '20 at 15:10
  • If you use a Content Query Web Part, you will have no choice but to create a CAML query, as simple UI-based filtering is not an option. There is also the possibility to create a Modern page within your classic site, but there are some hoops to jump through to configure the tenant to support it -- see here
    – willman
    Jan 3 '20 at 15:16
  • Thank you, I'll need to find some time to try it.
    – Philippos
    Jan 9 '20 at 12:21

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