1

I have to display list of all the document libraries of that SharePoint site in the SharePoint homepage i.e home.aspx page.

I there any way to do this, please let me know.

2 Answers 2

1

Solution 1: Use Highlighted content web part:

You can use Highlighted content web part for such scenarios and query your SharePoint site like ContentClass:"STS_List_DocumentLibrary" to get the list of document libraries in your site.

enter image description here

Use the Highlighted content web part

Solution 2: Create your own SPFx webpart:

You can create a custom SPFx webpart and use SharePoint REST API or Search API to get the document libraries in your site. Something like below:

<your_site_url>/_api/web/lists?$select=Title,ServerRelativeUrl&$filter=BaseTemplate eq 101 and hidden eq false

OR

<your_site_url>/_api/Web/lists?$select=Title,ServerRelativeUrl&$filter=BaseTemplate eq 101 and Title ne 'Site Assets' and Title ne 'Style Library'

References:

  1. Overview of the SharePoint Framework
  2. How can I list all document libraries under a site using REST API?
4
0

1.Use document library web part to show all the document libraries in the homepage.

2.Use quick links web part to list of all the document libraries in the homepage.

2
  • Yes we can use that and it is in manual way .but when a new document library is created, then i want that also to automatically save in the home page? is this possible?. If yes, then please help me in the issue.
    – user90269
    Commented Jul 15, 2020 at 13:33
  • I don't think it's possible to insert a web part into the homepage automatically. Commented Jul 16, 2020 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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