Add a webpart to a view on any SharePoint list or library

Add a webpart to a view on any SharePoint list or library

One of my favorite features in SharePoint is the sheer power available in lists and libraries. I love teaching this part of the platform because there are so many hidden gems, functionalities that people really don’t know about but can make such a difference.

This post is about adding a webpart to a list or library  view page. This functionality has been available since SharePoint 2010. Did you know that every single view in SharePoint is its own page and has its own URL, so that you can link directly to it?  This means that every single view page can be edited so that you can add a webpart to it.

Being able to edit a view page of a list has so many cool potential uses:

  1. Describe what you want users to do on this page – if they need instructions or help, adding this text to a content editor webpart is a helpful idea
  2. Add filter webparts to show specific content that could be useful
  3. Add another document library with associated content – maybe even combined with some filter webparts

You have the same capabilities as any other type of page in SharePoint where webparts can be added. Just note that you can’t add text directly as you can in a text layout – everything needs to happen via webparts.

In the following example, we will edit this document library page. Its URL is /Shared%20Documents/Forms/AllItems.aspx, which tells us that we are going to be editing the page related to the All Items view.   An alternative example could have been to create a view which shows all documents checked out to you and then add a content editor webpart asking people to plesae check in their documents.

A standard document library view


Now that we are here, though, how do we edit this page?  After all, there is no “edit page” button in the normal spot in the SharePoint interface:

Missing the "edit page" option?


In the olden days of SharePoint 2007 and before, there was no useful “edit page” option directly on the page. However, it has always been available via the cog-wheel. This option remains for editing pages, even in SharePoint 2013.  In the case of editing list view pages, you need to choose the option from the cog wheel.

Choose edit page via the cog-wheel

Once you have chosen to edit your page, you can see that it looks like most any webpart page. You do not have the option to change the page layout as you might for text layouts, but you can add webparts and move them around.

View page is in edit mode


The tabs related to the list or library  itself remain (and continue to work, even though the page is in edit mode), but you now have the “insert” tab.  The webpart tab is showing up as the “documents” webpart is selected.

If you choose the “insert” tab, then you have the option to insert any webpart that is available to you on your site collection. You can insert and edit the webpart as usual.

Choose the insert tab to select the webpart you wish to insert

Once you are finished adding, editing and perhaps deleting webparts, you can choose the “stop editing” button on the page tab of the ribbon. These pages do not support check-in, check-out or publishing – simply make your changes and then tell SharePoint you are finished.

Stop editing the page to save your changes

After you have stopped editing the page, all users who visit this view will see the webparts as you have configured them.

Neat trick, right?

7 responses

  1. I dont have an edit option under the cog. I am the admin on the site. Just need to add webpart at the top of the document library.

  2. With the new modern views on the libraries, though, the option for Edit page has been removed, unless you switch back to the classic view to be able to bring it up. With Microsoft though, we don’t know how long that option will be available.

  3. You didn’t say how to edit a Library to add a description. You said it could be done but then went on to describe how to do it on a List which is obvious.

  4. Thank you. Once we add required web part. then not able to switch back to modern view. This is limitation. I want to add instruction text in Document library which will work for both classic & modern.

    Any help on this will be appreciated. Thank you in advance!!