Since the document library only displays 3 views and then you are forced to click on an ellipsis to see the other views is it possible OOB to somehow display all the views on a separate page ?

Most of my users fail to realize that additional views are available by clicking on the ellipsis. At minimum it would be cleaner if I could create a separate page and maybe thru a web part display all the views...


3 Answers 3


Get View names/links after display

On the View Page you could run a script after the page is displayed

var Views=eval(ctx.ListSchema.ViewSelectorPivotMenuOptions);//convert String to Array
SP.UI.Status.addStatus("This page has more Views hidden behind the <b>...</b>");
Views.forEach(function(View){//loop all Views
    var HTML=String.format("<a href='{0}'>{1}</a>",View.OnClickAction,View.DisplayText);

Change ViewSelector with CSR before display

If you use CSR (with a JSlink on the ListView webpart) you have full control over the ViewSelector before it is displayed:

Vadim posted it a couple of times:

  • How to display more than 3 views in document library?
  • SharePoint 2013 Library Views

    function renderHeaderTemplateWithAllViewsMenu(renderCtx, fRenderHeaderColumnNames){
        var viewData = eval(renderCtx.ListSchema.ViewSelectorPivotMenuOptions);
        ClientPivotControl.prototype.SurfacedPivotCount = viewData.length -2; //display all View options except 'Create View' & 'Modify View'   
        return RenderHeaderTemplate(renderCtx, fRenderHeaderColumnNames); //render default Header template
      Templates: {
        Header: renderHeaderTemplateWithAllViewsMenu

Get View Names from another Page/List

I have never used it like this to construct the URL, so I think you have to construct the URLs from the Title yourself. (there is no URL defined in the ViewCreationInformation Object)

You can get the View definitions from (another) listID with:

var listID=SP.ListOperation.Selection.getSelectedList();
var context = SP.ClientContext.get_current();
var web = context.get_web();
var list=context.get_web().get_lists().getById(listID);
var views = list.get_views();
      var viewEnumerator = views.getEnumerator();
      while (viewEnumerator.moveNext()) {
        var view = viewEnumerator.get_current();
        var viewinfo={



Each view has a unique URL like /AllItems.aspx, /view1.aspx and so on, right? So if your views count is more than 3, but stable, what you can do is create a page with simple HTML content and manually put links to all views maybe adding some description. Wiki page will work even better

  • 1
    Thats what I initially started to do, but I wanted something more dynamic..If I get hit by a bus then the list will never get updated...but per your comment if I think the the views will be stable it is a possibility..why a Wiki page and not a reg. page
    – daPlayaURH
    Commented Feb 20, 2016 at 5:09
  • 1
    Wiki is just easier to set up with all that '[[ |' syntax. Solutions up above are dynamic. I'd implement this one - sharepoint.stackexchange.com/questions/112543/… . Given modern monitors' width it seems logical to show all views in a row . PS. Please don't get hit by a bus :) Commented Feb 20, 2016 at 9:26

Create an HTML Page and add the following Javascript. The following JS will fetch all the views on click of the button. You can modify it accordingly.

<script language="ecmascript" type="text/ecmascript">
       var web = null;
        var listCollection =null;
        var list = null;
        var viewCollection =null;

       function getViews() {
            var clientContext =new SP.ClientContext.get_current();
            if (clientContext != undefined && clientContext != null) {
                this.web = clientContext.get_web();
                this.listCollection = web.get_lists();
                this.list = listCollection.getByTitle("Documents");
                this.viewCollection = list.get_views();
                clientContext.executeQueryAsync(Function.createDelegate(this,this.onQuerySucceeded), Function.createDelegate(this,this.onQueryFailed));

       function onQuerySucceeded() {
            var viewName ='Views: \n';
            var viewsEnumerator =this.viewCollection.getEnumerator();
            while (viewsEnumerator.moveNext()) {
                var view = viewsEnumerator.get_current();
                viewName += view.get_title() + '\n';

       function onQueryFailed(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    <input id="btnGetViews" onclick="getViews()" type="button" value="Get All Views" />

Source: http://www.c-sharpcorner.com/UploadFile/anavijai/get-all-the-views-for-a-particular-list-in-sharepoint-2010-u/

  • So does this get views for the Documents library per your code above...
    – daPlayaURH
    Commented Feb 20, 2016 at 5:13
  • Yes. It gets the views
    – Dhruv Jain
    Commented Feb 20, 2016 at 9:23

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.