INTRODUCTION
Hi guys,
I have this requirement from the client to display the paging control on Top and Bottom on list view (or document libraries). By default SharePoint only displays the paging at the bottom. This article details on how to do it on both list view page or list view web part.
What you need:
– SharePoint Designer 2010 or 2013
HOW TO DO IT
List View Page
The list view page is the page that is used by the lists or document libraries to list your items and documents (ie. AllItems.aspx). You can also create your own custom view page before customizing it.
To customize it:
– Open SP Designer;
– Go to your list view page eg. AllItems.aspx;
– Then edit the page;
– Then go to this section <WebPartPages:XsltListViewWebPart>…… this is where the actual web part is;
– On the ribbon, go to DESIGN > Customize XSLT > Customize Entire View;
– Once you click that button, an <xsl>…</xsl> section is displayed with a lot of XSLT tags within it. This is the stuff that you want to use to modify the view of that web part.
– To show the paging at the top and bottom for example, copy the following line:
<xsl:call-template name=”pagingButtons” />
and paste it before the <table> tag, save the file and voila…you have paging on top and bottom:
You can further play around with the XSLT. Save the document and refresh the list view page and you will see the updated look and feel.
List View Web Part
Once you create a list or document library, you can then drop and drag it to a content page as a web part. Unfortunately you don’t have the flexibility of modifying the page to do the above. Therefore, the work around is:
– Go to your list or document library, then create a custom view. SharePoint will then create a List View Page for your view (eg. Test.aspx);
– Open SharePoint Designer and modify the List View Page as the above;
– Now, this is where it’s a bit different! Copy the content of <xsl>…..</xsl> WITHOUT the opening and closing <xsl></xsl> tag into a file and save it as YourFilename.xsl. The content of the file should start with <xsl:stylesheet>….
– Upload the XSL file to SharePoint site (eg. into Style Library);
– Go to your content page, drop the list/document library as a web-part on the page;
– Then go to Miscellaneous > XSL Link then specify the location to your uploaded XSL, save the web-part and voila!
Hope this helps,
Tommy




