SharePoint Dev Notes

Notes on SharePoint Development

Leave a comment

Handlebars + JSLink

First, I want to apologize for such a long silence. Project work and life in general has kept me very busy over the last year, so it has been difficult to find a time to write new content.

This article describes a specific scenario I experienced as part of my standard project work. It hasn’t been extended or tested for other scenarios (yet!). Handle with care.

Since the release of SharePoint 2013, I have been doing a lot of customizations utilizing JSLink on lists and list views. One of the things that I really do not like about JSLink is all of the string concatenation that tends to happen when building the output for your JSLink customization. It is not a huge challenge when you are working with a small template or limited output, but when you start working with complex HTML strings, it can be a bit unwieldy.
Continue reading


JS Link: Avoid Polluting the Global Namespace

Over the past few months I have been doing a lot of research around JavaScript frameworks and techniques as I am learning how to create SharePoint 2013/O365 Apps for clients. A recent project had a need to override the default view of a few columns. JS Link proved to be the easiest way to accomplish the changes, but every example that I found had all of the JavaScript functions placed squarely in the global namespace. One of the things that I find seems to be common among all of the books and articles I have read over the past three months clearly states that we should do our due diligence to keep the global namespace in JavaScript as clean as possible.

Continue reading


Using jQuery DataTables with Search Display Templates

The new display templates in SharePoint 2013 allow for some great flexibility for designers and web developers in presenting search results in almost any format desired. For a proof of concept, a client wanted to aggregate tasks from across SharePoint. The company manages multiple assets and would like to roll up all tasks for all users across all locations in SharePoint in a single location. We were able to accomplish this goal fairly easily thanks to the new search display templates available in SharePoint 2013. This project also makes use of jQuery and DataTables.

Continue reading


Auto Collapse Search Refinement Panel in SharePoint 2013

A recent client desired to have selected refiners automatically collapsed on their search pages. This is because the resulting search results could have between 5 and 15 refiners, each showing up to 15 individual refinement options. The end result was a page that had a refiner list falling below the core results, resulting in a lot of scrolling to find a specific refiner. The client wanted to see if some of the refiners that were known to have longer refinement options could be collapsed by default to reduce the amount of scrolling needed.
Continue reading


Get every new post delivered to your Inbox.

Join 500 other followers