SharePoint Dev Notes

Notes on SharePoint Development


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


Hit Highlighting using Search Display Templates in SharePoint 2013

SharePoint 2013 introduces the concept of Display Templates, specifically for search based web parts. This replaces the need to make use of XSLT to modify the way search results appear. However, one of the challenges I faced with a client is the ability to show the key terms in a record that caused it to show in the results. Following the limited guidance and several blog posts, I was able to create my own display template for an external content type.
Continue reading


Get every new post delivered to your Inbox.

Join 493 other followers