Archives For November 30, 1999


datatable

This might be one of the coolest JavaScript libraries out there for SharePoint, DataTables.js. DataTables.js allows you render a set of search results in data table format allowing you to Sort, Filter and Page automatically. Because SharePoint search allows you to search and return items from the entire farm you lost the ability to dynamically sort and quickly filter. DataTables give you this back in a very quick and easy to use format. To get data tables working we need the following:

  • jQuery library reference
  • DataTables library reference
  • DataTables base or custom css style sheet
  • Custom Control Template
  • Custom Item Template

Let’ s get started. First we need to created out custom control and item templates. These templates are created and stored at the site collection level. They are saved in the Master Page Gallery > Display Templates > Content Web Parts To create these two files you need to create two HTML files. This can be done by either copying an existing item and control template and replacing the code with the code below OR you can copy and paste this code directly into a new HTML file(s). Control Template Copy and paste the following code into a new Control_Grid.html file

Continue Reading…


The content query web part allows your to apply a custom item style using XSL to view the information in a custom way. This item style shows a Calendar Event with a nice visual icon. Everything renders on a single line.

 

Installation

  1. Open SharePoint Designer.
  2. Open your site collection where you want to use this style.
  3. Click on All Files > Style Library > XSL Style Sheets.
  4. Check out the ItemStyle.xsl file
  5. At the end of the file, before the </xsl:stylesheet> tag copy and paste the item style below.
  6. You can now access this item style in you CWQP presentation style drop down

Note: You must enter the following field mappings in the template in for it to render properly.

CQWP_Fields

Continue Reading…