This SharePoint customization tutorial, we will discuss, how to display/show more than three views in SharePoint 2013 list or document library.
The same script code we can use in SharePoint 2013/2016 or in SharePoint Online to show more than three views in SharePoint list or library.
By default if you open any SharePoint list or document library, then you can see it will see 3 views in the page and rest of the views you can see after clicking on the (…) like below:
As you can see in this example, you will be able to see 3 links like All Items, View-1 & View-2 and rest two views we can see after clicking on the … button.
Display more than 3 views in SharePoint List or Library
We can add a few lines of script code to display more than 3 views in SharePoint list or libraries.
Open the SharePoint list or library and then Edit the page. Then add a Web Part and then from the web part categories select Media and Content and then choose Script Editor web part like below:
Then click on EDIT SNIPPET and then put the below code.
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(IncreaseSurfacePivotCount, 'clienttemplates.js');
function IncreaseSurfacePivotCount() {
ClientPivotControl.prototype.SurfacedPivotCount = 5;
};
</script>
Here 5 is the number of views you want to appear on the page.
Then Save the page.. Once you refresh the page you can see all 4 list views are appearing like below:
Below is a screen show from how it is appearing in a SharePoint 2016 list.
You may like following SharePoint list or library tutorials:
- Add JSLink in Task List View in SharePoint Online
- Change default list view style using CSS in SharePoint Online/2016/2013
- Add header and footer to list view web part using JSLink in SharePoint Online/2013/2016
- Customize list view using jslink in SharePoint 2013/2016/Online
- SharePoint 2016/Online List View Auto Indexing Automatic Index Management
- Change width of list view column in SharePoint 2013 using SharePoint designer 2013
- Show paging at top in list view web part in SharePoint 2013/2016/Online using jQuery
- Freeze Header Row in List View or Library on Scrolling using jQuery in SharePoint 2013/2016/Online
- Remove hyperlink from title column in SharePoint 2010/2013/Online list view
- Display Sum Total in SharePoint 2013 Online List View
- Rename SharePoint 2013 list column title in list view using jQuery
Hope this will be helpful to know how to display more than 3 views in SharePoint 2013/2016 or SharePoint Online list or document library.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com
Just tried this and it does not work for SharePoint on prem 2013. The webpart was inserted above the view.
Hi Steve, Are you getting any script error? The code should work.
Hi Steve, The code is working well in SharePoint 2013/2016 and for SharePoint Online also. Kindly verify, if you are getting any script error.
Same issue for me. Doesn’t change anything.
Doesn’t Work
Hi, this is working well in my environment (fully patched sp2013 Foundation), however when applied I lose the Items and List ribbon menu tabs. Verified by removing the script. Is there a way around this?