Sunday 26 April 2015

Custom list view customize using XSLT:


In custom list we have different types of view to display. But when we have a requirement that to show the items in 3*3 matrix mode. Then how to do it? Here we can achieve this by customize the default available XSLT in the SharePoint designer.

  1. Create a custom list with the different fields (Name, Email Id, and Mobile).
  2. Create a view as “Display View” in my case.
  3. Open SharePoint designer and click on the lists and libraries.
  4. Find out your list and open the view (here Display view)
  5. Change the view from the “Design” tab in the ribbon under the “List view tools” and select the Boxed, no labels design.
  6. Then click on the Customize XSLT option.
  7. Then find out the below line in the code
    • <xsl:when test="$Position mod 2 = 0">ms-alternating</xsl:when>
    • <xsl:when test="$Position mod 2 = 0"
  8. Change the $Position mod 3 = 0 in both the places and save
  9. Now you can see the change like below.
   



0 comments:

Post a Comment