I want to display root site List items in sub-sites. The reason is to avoid creating lists at multiple sites. How can I achieve this in SharePoint modern web part?
Thanks
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityThe modern experience lacks the possibility to use the standard search webpart. But they have something called Highlighted content. It is a bit tricky to configure but with some time and quite a few tries you can get to an almost perfect solution. Please have a look at the images below.
If highlighted content is not what you are looking for maybe this is your thing. This one is an example made by Elio Struyf: SearchSpfx. You have to build and upload the webpart your self.
Path here is the url to the list itself.
This results in the following view.
Unfortunately it does not really exist a modern OOTB webpart capable of what you are looking for. But as i showed in the beginning of the post there are some custom webparts that do what you are asking for.
This solution works on premise. There is no way implementing it on SharePoint Online OOTB.