SlideShare a Scribd company logo
Using JSLink and Display Templates with
List View Web Parts for ITPros
#SPSSTHLM19
Paul Hunt (@cimares)
January 25th, 2014

SharePoint Saturday

Stockholm
Gold

SharePint

Bronze
Raffle
Who Am I?
SharePoint Architect for Trinity
Expert Systems
• Co-organiser of SUGUK
London Region
• Member of the SharePoint
community since 2007
• In my spare time I’m a
woodturner, making Pots,
Pens and artistic pieces!
•

• Paul Hunt
• Twitter: @Cimares
What is this session all about?
•

The List View Web Part
Who’s this session for?
•

Primarily First/Second tier developers
 ITPros who customised 2010 list views in SPD
 ITPros that used to write their own XSLT in SP2010
 Developers that want to know what's available before opening VS2012

•

On Premises or Office 365 Deployments

• Might not be ideal for someone who isn’t comfortable with JavaScript, HTML
and CSS.
– Though if you used to play in SPD 2010 you’re halfway there!
– If you want to know what's achievable without deployed solutions
What did we used to do?
•

We used SPD and the Design View
 We did conditional formatting
 Played with colours
 Injected Hyperlinks
What did we used to do?
•

But
 No design view anymore!
What did we used to do?
•

We used XSLT Overrides (Still exist, but deprecated!)
What did we used to do?
•

We used XSLT Overrides (Still exist, but deprecated!)
 Which took boring list data views
What did we used to do?
•

We used XSLT Overrides (Still exist, but deprecated!)
 And transformed them into engaging visual representations
What did we used to do?
•

We used custom code solutions (We still can!)
 Custom CAML Rendering Templates
 Custom List Views
 Custom Web Parts

• All bring additional headaches
So why the focus on Client Side Rendering?
So why the focus on Client Side Rendering?
•

It’s client side, moving the impact of customisations off of the web server
and onto the often powerful and under utilised client machine

SETI@Home
Folding@Home
So why the focus on Client Side Rendering?
•

It’s client side, moving the impact of customisations off of the web server
and onto the often powerful and under utilised client machine

• Some client machines may struggle with heavy Javascript loads!
Specifically why JavaScript, HTML and CSS?
It’s easier to develop..
• Much simpler than XSLT
• Certainly easier to troubleshoot than XSLT
• Likely to have the skills in house
• Cross-platform (ish!)
•

 Some frameworks such as jQuery help with this
Exactly what is a JavaScript Display Template?
A small piece of JavaScript code that is called by the
browser AFTER the page has been delivered.
• They are prolific in SharePoint 2013
•

 Some examples
 Search Results
 Field Rendering
 Search Refiners
 List Forms
 List views
 eDiscovery
LVWP Templates != Search Display Templates

17

LVWP Display Templates are JavaScript only.
• They do not start life as HTML like Display Templates for
search do.
• They do not require embedded properties.
• CONTEXT (ctx) is king!
•
We’re just looking at:•

List View Display Templates
 These provide the ability to override the rendering of an entire view

•

Field Rendering Display Templates
 These provide the ability to override the rendering of a single field in a list

view
Anatomy of a List View Display Template
Start with an empty .JS (Or copy my examples)
• Define a Function to register the Display Template
• Define the Function called by the Display Template for
each item.
• Call the register function
•
Anatomy of a List View Display Template
•

Define a Function to register the Display Template

For a list of template types see - http://bit.ly/169AbS9
Anatomy of a List View Display Template
•

Define the Function called by the Display Template

• Note the use of ctx.CurrentItem.Title
– Any field in the view can be obtained this way
– You must use the internal name
• Obtained from the edit column screen
Anatomy of a List View Display Template
•

Call the function we defined when the page loads.
Anatomy of a Field Rendering Display Template
•

All that really changes is the override set-up

• This time there are no headers/footers
• We only specify the Base View ID/Field Name
Anatomy of a Field Rendering Display Template
•

The render function is similar to the list view
How do we use them with List Views?
•

First we need to upload/create them in the MasterPage
gallery
How do we use them with List Views?
•

Set some metadata
How do we use them with List Views?
•

Add a link into the JSLink on the web part

• Note the ~token in use
–
–
–
–
–

~sitecollection
~site
~layouts
~sitecollectionlayouts
~sitelayouts

• You can have multiple JSLinks
– Join them with |
Adding JSLink Demo
How do we troubleshoot?
•

IE Developers Toolbar (Other debuggers exist!)
How do we troubleshoot?
•

Fiddler – HTTP Proxy
How do we troubleshoot?
•

Fiddler – HTTP Proxy
Troubleshooting in IE with the F12
Dashboard

http://bit.ly/12kMPvr
There has to be a catch?
Minimal Download Strategy
• Multiple list views on a page
• Changing SharePoint functionality
•
There has to be a catch?
•

Minimal Download Strategy
 Our display templates work on page load
 But fail during a refresh.
 This is because our JavaScript doesn’t get called a second time

Two workarounds!
• Turn off the Minimal Download Feature in each Web
•

• Include the relevant JavaScript in your Display Template code
There has to be a catch?
•

Multiple list views on a page
 Because of the way Display Templates are registered, it’s not possible to have

two on the page if the list templates are the same.
(E.g. Custom TemplateType = 100)
 There is a workaround though published on my blog
 http://bit.ly/136e0e3
There has to be a catch?
•

Changing/Breaking SharePoint functionality
 For example, overriding the Tasks view breaks SharePoint rendering.
 This is fixed in the earlier Field demo with a couple of lines of JavaScript.
Page lifecycle
•

SharePoint outputs JSLink in the Header of the page
 This registers our Display Template
Page lifecycle
•

SharePoint LVWP outputs the list data into the page
 JSON Object Format
Page lifecycle
•

And finally after setting things up
 Calls the RenderListView() function for the web part.

• Which in turn:
– Calls the GetTemplates()
Page lifecycle
•

Which compares the Context object to the list of
registered overrides

• And if everything is in place, our override
wins the battle!
Display Template Demos
Questions?
Call to Action!
•

Take a look at these sites for more detailed info

Wes Preston – JS Link a primer - http://bit.ly/102fcNa
• Martin Hatch – JSLink 7 part series - http://bit.ly/Hh5zFk
• My blog
•

 Solving the multiple list view issue - http://bit.ly/JSLinkIssues
 Editing local JS files using fiddler - http://bit.ly/EditUsingFiddler

43
Don’t forget SharePint!
•

SHARE·PINT: [SHAIR-PAHYNT]
Noun
1. An assembly or meeting in relation to Microsoft
SharePoint, accompanied with an alcoholic beverage.
SPSSTHLM - Using JSLink and Display Templates for ITPros

More Related Content

What's hot (20)

PPTX
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Chris O'Brien
 
PPTX
SharePoint Branding From Start to Finish
Kanwal Khipple
 
PPTX
O365 Saturday - Deepdive SharePoint Client Side Rendering
Riwut Libinuko
 
PPTX
#SPSLondon - Session 2 JSLink for IT Pros
Paul Hunt
 
PPTX
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
Wes Preston
 
PPTX
ECS 19 Bert Jansen - Taking your SharePoint to the next level – Transforming ...
European Collaboration Summit
 
PPTX
Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon
SPTechCon
 
PPTX
Gabriel Gayhart - XML Pointer File Example
linkedinsys
 
PPTX
SharePoint Branding Guidance @ SharePoint Saturday Redmond
Kanwal Khipple
 
PPT
Automating SQL Server Database Creation for SharePoint
Talbott Crowell
 
PPTX
The A to Z of Building a Responsive SharePoint Site with Bootstrap
Thomas Daly
 
PDF
SharePoint Saturday Kansas 2015 - Building Killer Office365 Public Sites
Brian Culver
 
PPTX
Enhance SharePoint 2013 with Responsive Web Design
Eric Overfield
 
PDF
SharePointFest 2013 Washington DC - WF 204 - Build scalable SharePoint 2013 S...
Brian Culver
 
PPTX
A Power User's Intro to jQuery Awesomeness in SharePoint
Mark Rackley
 
PPTX
Integrating Search Driven Content in SharePoint 2013/2016/O365
Eric Overfield
 
PPTX
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
Sonja Madsen
 
PPTX
Using jQuery to Maximize Form Usability
Mark Rackley
 
PDF
ECS19 - Laura Kokkarinen - Everything you need to know about SharePoint site ...
European Collaboration Summit
 
PPTX
SharePoint Saturday Utah 2015 - SP2013 Search Driven Sites
Brian Culver
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Chris O'Brien
 
SharePoint Branding From Start to Finish
Kanwal Khipple
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
Riwut Libinuko
 
#SPSLondon - Session 2 JSLink for IT Pros
Paul Hunt
 
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
Wes Preston
 
ECS 19 Bert Jansen - Taking your SharePoint to the next level – Transforming ...
European Collaboration Summit
 
Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon
SPTechCon
 
Gabriel Gayhart - XML Pointer File Example
linkedinsys
 
SharePoint Branding Guidance @ SharePoint Saturday Redmond
Kanwal Khipple
 
Automating SQL Server Database Creation for SharePoint
Talbott Crowell
 
The A to Z of Building a Responsive SharePoint Site with Bootstrap
Thomas Daly
 
SharePoint Saturday Kansas 2015 - Building Killer Office365 Public Sites
Brian Culver
 
Enhance SharePoint 2013 with Responsive Web Design
Eric Overfield
 
SharePointFest 2013 Washington DC - WF 204 - Build scalable SharePoint 2013 S...
Brian Culver
 
A Power User's Intro to jQuery Awesomeness in SharePoint
Mark Rackley
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Eric Overfield
 
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
Sonja Madsen
 
Using jQuery to Maximize Form Usability
Mark Rackley
 
ECS19 - Laura Kokkarinen - Everything you need to know about SharePoint site ...
European Collaboration Summit
 
SharePoint Saturday Utah 2015 - SP2013 Search Driven Sites
Brian Culver
 

Similar to SPSSTHLM - Using JSLink and Display Templates for ITPros (20)

PPTX
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
BIWUG
 
PPTX
Spsbe using js-linkanddisplaytemplates
Paul Hunt
 
PPTX
JSLink for ITPros - SharePoint Saturday Jersey
Paul Hunt
 
PPTX
SXA in action
pratik satikunvar
 
PPTX
Nsc 2013 06-17 - random rants on 2013
Mikael Svenson
 
PPTX
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...
Anindita Bhattacharya
 
PPTX
Drew madelung sp designer workflows - sp-biz
Drew Madelung
 
PPTX
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
SPTechCon
 
PPTX
Custom Development for SharePoint
Talbott Crowell
 
PPTX
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
Thomas Daly
 
PDF
Spca2014 js link and display templates hatch
NCCOMMS
 
PPTX
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Asish Padhy
 
PPTX
SharePoint 2013 Sandbox Solutions for On Premise or Office 365
Ed Musters
 
PPTX
Broaden your dev skillset with SharePoint branding options
Eric Overfield
 
PPTX
Ui devopler
Janu Jahnavi
 
PDF
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT
 
PPTX
Cross Site Collection Navigation
Thomas Daly
 
PDF
Stencil the time for vanilla web components has arrived
Gil Fink
 
PPTX
Share point 2013 Building Websites
Suhas R Satish
 
PPTX
Session 1 branding and site development in SharePoint
Khoa Quach
 
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
BIWUG
 
Spsbe using js-linkanddisplaytemplates
Paul Hunt
 
JSLink for ITPros - SharePoint Saturday Jersey
Paul Hunt
 
SXA in action
pratik satikunvar
 
Nsc 2013 06-17 - random rants on 2013
Mikael Svenson
 
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...
Anindita Bhattacharya
 
Drew madelung sp designer workflows - sp-biz
Drew Madelung
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
SPTechCon
 
Custom Development for SharePoint
Talbott Crowell
 
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
Thomas Daly
 
Spca2014 js link and display templates hatch
NCCOMMS
 
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Asish Padhy
 
SharePoint 2013 Sandbox Solutions for On Premise or Office 365
Ed Musters
 
Broaden your dev skillset with SharePoint branding options
Eric Overfield
 
Ui devopler
Janu Jahnavi
 
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT
 
Cross Site Collection Navigation
Thomas Daly
 
Stencil the time for vanilla web components has arrived
Gil Fink
 
Share point 2013 Building Websites
Suhas R Satish
 
Session 1 branding and site development in SharePoint
Khoa Quach
 
Ad

More from Paul Hunt (11)

PPTX
Exploring conditional access to content stored in Office 365 - SPS Helsinki
Paul Hunt
 
PPTX
Exploring conditional access to content stored in office 365 spsce
Paul Hunt
 
PPTX
Exploring conditional access to content stored in Office 365
Paul Hunt
 
PPTX
What do you mean 90 days isnt enough
Paul Hunt
 
PPTX
Spsnl18 exploring identity management options in office 365
Paul Hunt
 
PPTX
Spunite exploring identity management options in office 365
Paul Hunt
 
PPTX
Making auditing great again! Office 365
Paul Hunt
 
PPTX
#SPSLondon - Session 1 - Building an faq for end users
Paul Hunt
 
PPTX
SPSBE building an faq for end users
Paul Hunt
 
PPTX
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...
Paul Hunt
 
PPT
Iw411 migrating content by search from 2010 into 2013 - minified
Paul Hunt
 
Exploring conditional access to content stored in Office 365 - SPS Helsinki
Paul Hunt
 
Exploring conditional access to content stored in office 365 spsce
Paul Hunt
 
Exploring conditional access to content stored in Office 365
Paul Hunt
 
What do you mean 90 days isnt enough
Paul Hunt
 
Spsnl18 exploring identity management options in office 365
Paul Hunt
 
Spunite exploring identity management options in office 365
Paul Hunt
 
Making auditing great again! Office 365
Paul Hunt
 
#SPSLondon - Session 1 - Building an faq for end users
Paul Hunt
 
SPSBE building an faq for end users
Paul Hunt
 
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...
Paul Hunt
 
Iw411 migrating content by search from 2010 into 2013 - minified
Paul Hunt
 
Ad

Recently uploaded (20)

PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Digital Circuits, important subject in CS
contactparinay1
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 

SPSSTHLM - Using JSLink and Display Templates for ITPros

  • 1. Using JSLink and Display Templates with List View Web Parts for ITPros #SPSSTHLM19 Paul Hunt (@cimares) January 25th, 2014 SharePoint Saturday Stockholm
  • 3. Who Am I? SharePoint Architect for Trinity Expert Systems • Co-organiser of SUGUK London Region • Member of the SharePoint community since 2007 • In my spare time I’m a woodturner, making Pots, Pens and artistic pieces! • • Paul Hunt • Twitter: @Cimares
  • 4. What is this session all about? • The List View Web Part
  • 5. Who’s this session for? • Primarily First/Second tier developers  ITPros who customised 2010 list views in SPD  ITPros that used to write their own XSLT in SP2010  Developers that want to know what's available before opening VS2012 • On Premises or Office 365 Deployments • Might not be ideal for someone who isn’t comfortable with JavaScript, HTML and CSS. – Though if you used to play in SPD 2010 you’re halfway there! – If you want to know what's achievable without deployed solutions
  • 6. What did we used to do? • We used SPD and the Design View  We did conditional formatting  Played with colours  Injected Hyperlinks
  • 7. What did we used to do? • But  No design view anymore!
  • 8. What did we used to do? • We used XSLT Overrides (Still exist, but deprecated!)
  • 9. What did we used to do? • We used XSLT Overrides (Still exist, but deprecated!)  Which took boring list data views
  • 10. What did we used to do? • We used XSLT Overrides (Still exist, but deprecated!)  And transformed them into engaging visual representations
  • 11. What did we used to do? • We used custom code solutions (We still can!)  Custom CAML Rendering Templates  Custom List Views  Custom Web Parts • All bring additional headaches
  • 12. So why the focus on Client Side Rendering?
  • 13. So why the focus on Client Side Rendering? • It’s client side, moving the impact of customisations off of the web server and onto the often powerful and under utilised client machine SETI@Home Folding@Home
  • 14. So why the focus on Client Side Rendering? • It’s client side, moving the impact of customisations off of the web server and onto the often powerful and under utilised client machine • Some client machines may struggle with heavy Javascript loads!
  • 15. Specifically why JavaScript, HTML and CSS? It’s easier to develop.. • Much simpler than XSLT • Certainly easier to troubleshoot than XSLT • Likely to have the skills in house • Cross-platform (ish!) •  Some frameworks such as jQuery help with this
  • 16. Exactly what is a JavaScript Display Template? A small piece of JavaScript code that is called by the browser AFTER the page has been delivered. • They are prolific in SharePoint 2013 •  Some examples  Search Results  Field Rendering  Search Refiners  List Forms  List views  eDiscovery
  • 17. LVWP Templates != Search Display Templates 17 LVWP Display Templates are JavaScript only. • They do not start life as HTML like Display Templates for search do. • They do not require embedded properties. • CONTEXT (ctx) is king! •
  • 18. We’re just looking at:• List View Display Templates  These provide the ability to override the rendering of an entire view • Field Rendering Display Templates  These provide the ability to override the rendering of a single field in a list view
  • 19. Anatomy of a List View Display Template Start with an empty .JS (Or copy my examples) • Define a Function to register the Display Template • Define the Function called by the Display Template for each item. • Call the register function •
  • 20. Anatomy of a List View Display Template • Define a Function to register the Display Template For a list of template types see - http://bit.ly/169AbS9
  • 21. Anatomy of a List View Display Template • Define the Function called by the Display Template • Note the use of ctx.CurrentItem.Title – Any field in the view can be obtained this way – You must use the internal name • Obtained from the edit column screen
  • 22. Anatomy of a List View Display Template • Call the function we defined when the page loads.
  • 23. Anatomy of a Field Rendering Display Template • All that really changes is the override set-up • This time there are no headers/footers • We only specify the Base View ID/Field Name
  • 24. Anatomy of a Field Rendering Display Template • The render function is similar to the list view
  • 25. How do we use them with List Views? • First we need to upload/create them in the MasterPage gallery
  • 26. How do we use them with List Views? • Set some metadata
  • 27. How do we use them with List Views? • Add a link into the JSLink on the web part • Note the ~token in use – – – – – ~sitecollection ~site ~layouts ~sitecollectionlayouts ~sitelayouts • You can have multiple JSLinks – Join them with |
  • 29. How do we troubleshoot? • IE Developers Toolbar (Other debuggers exist!)
  • 30. How do we troubleshoot? • Fiddler – HTTP Proxy
  • 31. How do we troubleshoot? • Fiddler – HTTP Proxy
  • 32. Troubleshooting in IE with the F12 Dashboard http://bit.ly/12kMPvr
  • 33. There has to be a catch? Minimal Download Strategy • Multiple list views on a page • Changing SharePoint functionality •
  • 34. There has to be a catch? • Minimal Download Strategy  Our display templates work on page load  But fail during a refresh.  This is because our JavaScript doesn’t get called a second time Two workarounds! • Turn off the Minimal Download Feature in each Web • • Include the relevant JavaScript in your Display Template code
  • 35. There has to be a catch? • Multiple list views on a page  Because of the way Display Templates are registered, it’s not possible to have two on the page if the list templates are the same. (E.g. Custom TemplateType = 100)  There is a workaround though published on my blog  http://bit.ly/136e0e3
  • 36. There has to be a catch? • Changing/Breaking SharePoint functionality  For example, overriding the Tasks view breaks SharePoint rendering.  This is fixed in the earlier Field demo with a couple of lines of JavaScript.
  • 37. Page lifecycle • SharePoint outputs JSLink in the Header of the page  This registers our Display Template
  • 38. Page lifecycle • SharePoint LVWP outputs the list data into the page  JSON Object Format
  • 39. Page lifecycle • And finally after setting things up  Calls the RenderListView() function for the web part. • Which in turn: – Calls the GetTemplates()
  • 40. Page lifecycle • Which compares the Context object to the list of registered overrides • And if everything is in place, our override wins the battle!
  • 43. Call to Action! • Take a look at these sites for more detailed info Wes Preston – JS Link a primer - http://bit.ly/102fcNa • Martin Hatch – JSLink 7 part series - http://bit.ly/Hh5zFk • My blog •  Solving the multiple list view issue - http://bit.ly/JSLinkIssues  Editing local JS files using fiddler - http://bit.ly/EditUsingFiddler 43
  • 44. Don’t forget SharePint! • SHARE·PINT: [SHAIR-PAHYNT] Noun 1. An assembly or meeting in relation to Microsoft SharePoint, accompanied with an alcoholic beverage.