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:
- 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
- Add filter webparts to show specific content that could be useful
- 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.
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:
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.
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.
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.
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.
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?