XsltListViewWebPart and custom XSLT for List View Web Part, Paging Control Top and Bottom

Posted in: Blog, SharePoint 2010, SharePoint 2013, Uncategorized |

No comments

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;

7

– 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;

8

– 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:

9

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!

12

 

11

 

Hope this helps,

Tommy

Written by

A web solution expert who has passion in website technologies. Tommy has been in the web industry for more than 10 years. He started his career as a PHP developer and has now specialized in ASP.NET, SharePoint and MS CRM. During his career he has also been in many roles: system tester, business analyst, deployment and QA manager, team and practice leader and IT manager.

No Comments Yet.

Leave a Reply

You must be logged in to post a comment.

Our Services

We provides you the best Services in our themes.

  • Click on the link below to see a full list of clients which we have developed solutions and provided consultancy for.

    READ MORE

  • We are solution-centered and not application-centered.

    READ MORE

  • Being creative and having fun and yet still delivering a fantastic service is the center of our values.

    READ MORE

  • TFS Consulting Services guarantees delivery that is within budget and deadline or you engage us for free.

    READ MORE

Implementing IT does not have to be difficult.

As long as you have the right methodologies

We have heard a lot of complaints from our clients that IT a lot of the times give them headache. The issues range from over-budget implementation, server is too hard to maintain, application is not user friendly, features not complete and many others. If you have ever experienced similar situations, don’t worry. This is why TFS Consulting Services is here. We exist to help clients implementing a successful IT solution. We have various methodologies which we have proven working in delivering a successful IT implementation. Below is the list of some of our key service offerings:
  • Planning and Methodologies

    Implementing IT solution does not have to be difficult. TFS Consulting Services has a lot of resources on planning and methodologies that will ensure successful delivery of your IT solution. TFS Consulting Services has been around in the web industry for more than 10 years and has experienced all the successes and failures of various type of IT deployment.

    read more

  • Technical Resource

    Do you need a technical resource? TFS Consulting Services can also provide you with technical resource for developing ASP.NET (C# and VB.NET), SharePoint (2003, 2007, 2010, 2013) and MS CRM applications. Our resource is an Microsoft Certified Personnel (MVP) and Microsoft Certified Technology Specialist (MCTS) in all ASP.NET, SharePoint and CRM.

    read more

  • IT Consulting & Advice

    Make sure your IT implementation is robust and scalable. TFS Consulting Services can provide consulting and advice on industry’s best practice on various web-related areas such as website security, design and usability, application-specific (such as SharePoint)’s best practice, Search Engine Optimisation (SEO), coding standards and many others.

    read more

  • Solution Development

    Finally TFS Consulting Services provides you with solution development service. We mainly work with Microsoft technologies (ie. .NET and SQL Server), however we are also capable of developing with PHP and MySQL. If you ever need any business process automation, integration and solution development work,  we are the trusted expert you should go to.

    read more

For more detailed service offerings please visit our Solutions page.

Testimonials

  • I’m happy to recommend Tommy as a knowledgeable and diligent developer.

    Mike Stringfellow, Vivid Group
  • Tommy has a lot of great ideas that can be delivered into great products. It’s a pleasure working with him because he has a broad knowledge about available technologies out there and he knows what’s best for the client’s needs. He just knows how to work effectively and efficiently.

    Teddy Segoro, Student Edge
  • I’ve worked with Tommy over the past 6 months and have found his approach to development (especially SharePoint) absolutely outstanding. Tommy goes beyond the boundries of typical software development with his ability understand what a client requires and then build it into fully fledged software solution. Coupled with his professional “Best Practice” approach, you get Continue Reading

    Michael Bonham, DSC-IT

Contact us

Tommy Segoro
tommy@tfsconsulting.com.au
+61 404 457 754

   

© TFS Consulting Services 2024. All rights reserved.

www.incorporator.com.au