SlideShare una empresa de Scribd logo
1 de 56
Using JSLink and Display Templates
with the List View Web Part for ITPros
#SPSBE23
Paul Hunt
April 26th, 2014
Gold
Silver
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
• www.myfatblog.co.uk
• www.trinityservice.co.uk
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?
• 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!
So why the focus on Client Side Rendering?
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
These 4 relate to Search.
22
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
Page Lifecycle – The Foundations
Page lifecycle – The Foundations
• SharePoint outputs JSLink in the Header of the page
 This registers our Display Template
Page lifecycle – The Foundations
• SharePoint LVWP outputs the list data into the page
 JSON Object Format
Page lifecycle – The Foundations
• And finally after setting things up
 Calls the RenderListView() function for the web part.
• Which in turn:
– Calls the GetTemplates()
Page lifecycle – The Result
• Which compares the Context object to the list of
registered overrides
• And if everything is in place, our override
wins the battle!
###CALLOUT – Internal Name Pain
• Creating your fields carefully will save you pain!
###CALLOUT – Internal Name Pain
• Creating your fields carefully will save you pain!
• Internal names get encoded once, then URL encoded when displayed.
• The displayed name
The%5Fx0020%5Fnumber%5Fx0020%5Fof%5Fx0020%5F
• Is actually an internal name of: The_x0020_number_x0020_of_x0020_
###CALLOUT – Internal Name Pain
• Creating your fields carefully will save you pain!
• Multiple long field names lose meaning
• The_x0020_number_x0020_of_x0020_ • The_x0020_number_x0020_of_x0020_0
Anatomy of a List View Display
Template• Start with an empty .JS (Or copy example templates)
• 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
– Beware the double encoding issue!
• Or using the browser debugger
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 item
function
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 |
How do we troubleshoot?
• IE Developers Toolbar (Other debuggers exist!)
How do we troubleshoot?
• Fiddler – HTTP Proxy
How do we troubleshoot?
• Fiddler – HTTP Proxy
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/JSLinkIssues
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.
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
54
Don’t forget SharePint!
• SHARE·PINT: [SHAIR-PAHYNT]
Noun
1. An assembly or meeting in relation to Microsoft
SharePoint, accompanied with an alcoholic beverage.
Spsbe   using js-linkanddisplaytemplates

Más contenido relacionado

La actualidad más candente

Sitecore Experience Accelerator (SxA)
Sitecore Experience Accelerator (SxA)Sitecore Experience Accelerator (SxA)
Sitecore Experience Accelerator (SxA)Ruud van Falier
 
Webdev CCI Tel U - Introduction to HTML 5.0
Webdev CCI Tel U - Introduction to HTML 5.0Webdev CCI Tel U - Introduction to HTML 5.0
Webdev CCI Tel U - Introduction to HTML 5.0webdevccitelu
 
Face/Off: APEX Templates & Themes
Face/Off: APEX Templates & ThemesFace/Off: APEX Templates & Themes
Face/Off: APEX Templates & Themescrokitta
 
Building a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngineBuilding a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngineOttergoose
 
Intro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterIntro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterbrightrocket
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5Ravi Raj
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersChristian Rokitta
 
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesJer Clarke
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016David Brattoli
 
SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)
SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)
SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)Patrick Jackson
 
Code & design your first website (3:16)
Code & design your first website (3:16)Code & design your first website (3:16)
Code & design your first website (3:16)Thinkful
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
Introduction to html 5
Introduction to html 5Introduction to html 5
Introduction to html 5Nir Elbaz
 
MCC Web Design Workshop
MCC Web Design WorkshopMCC Web Design Workshop
MCC Web Design WorkshopFaye Tandog
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101Greg Hurlman
 
Implementing SharePoint: Site Customization and Branding
Implementing SharePoint: Site Customization and BrandingImplementing SharePoint: Site Customization and Branding
Implementing SharePoint: Site Customization and Brandingdrudolph11
 

La actualidad más candente (20)

SXA in action
SXA in actionSXA in action
SXA in action
 
Sitecore Experience Accelerator (SxA)
Sitecore Experience Accelerator (SxA)Sitecore Experience Accelerator (SxA)
Sitecore Experience Accelerator (SxA)
 
Challenges going mobile
Challenges going mobileChallenges going mobile
Challenges going mobile
 
Webdev CCI Tel U - Introduction to HTML 5.0
Webdev CCI Tel U - Introduction to HTML 5.0Webdev CCI Tel U - Introduction to HTML 5.0
Webdev CCI Tel U - Introduction to HTML 5.0
 
Face/Off: APEX Templates & Themes
Face/Off: APEX Templates & ThemesFace/Off: APEX Templates & Themes
Face/Off: APEX Templates & Themes
 
Building a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngineBuilding a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngine
 
Intro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterIntro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniter
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX Developers
 
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)
SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)
SEO In Joomla - Patrick Jackson (JoomlaDay Melbourne & Sydney 2010)
 
Code & design your first website (3:16)
Code & design your first website (3:16)Code & design your first website (3:16)
Code & design your first website (3:16)
 
Html 5
Html 5Html 5
Html 5
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
Introduction to html 5
Introduction to html 5Introduction to html 5
Introduction to html 5
 
MCC Web Design Workshop
MCC Web Design WorkshopMCC Web Design Workshop
MCC Web Design Workshop
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101
 
SOA on Rails
SOA on RailsSOA on Rails
SOA on Rails
 
Implementing SharePoint: Site Customization and Branding
Implementing SharePoint: Site Customization and BrandingImplementing SharePoint: Site Customization and Branding
Implementing SharePoint: Site Customization and Branding
 

Destacado

GitHubで見つかるFileMaker関連ソフトウェア
GitHubで見つかるFileMaker関連ソフトウェアGitHubで見つかるFileMaker関連ソフトウェア
GitHubで見つかるFileMaker関連ソフトウェアAtsushi Matsuo
 
Bing Search API 使ってみました
Bing Search API 使ってみましたBing Search API 使ってみました
Bing Search API 使ってみました良太 増子
 
Zetta: An API First Platform
Zetta: An API First PlatformZetta: An API First Platform
Zetta: An API First PlatformAPI Meetup
 
Generos musicales 11
Generos musicales 11Generos musicales 11
Generos musicales 11Julian Kote
 
Ben Hill - Develop Indie Dev Day Presentation
Ben Hill - Develop Indie Dev Day PresentationBen Hill - Develop Indie Dev Day Presentation
Ben Hill - Develop Indie Dev Day Presentationjoel_tecmark
 
#SPSLondon - Session 1 - Building an faq for end users
#SPSLondon - Session 1 - Building an faq for end users#SPSLondon - Session 1 - Building an faq for end users
#SPSLondon - Session 1 - Building an faq for end usersPaul Hunt
 
Iw411 migrating content by search from 2010 into 2013 - minified
Iw411   migrating content by search from 2010 into 2013 - minifiedIw411   migrating content by search from 2010 into 2013 - minified
Iw411 migrating content by search from 2010 into 2013 - minifiedPaul Hunt
 
SPSBE building an faq for end users
SPSBE building an faq for end usersSPSBE building an faq for end users
SPSBE building an faq for end usersPaul Hunt
 
тунец бонито
тунец бонитотунец бонито
тунец бонитоresfood_kuzin
 
TAS 2016- Akshay Thapliyal
TAS 2016- Akshay ThapliyalTAS 2016- Akshay Thapliyal
TAS 2016- Akshay ThapliyalAkshay Thapliyal
 
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...Paul Hunt
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templatesPaul Hunt
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsPaul Hunt
 
ストリーミング音楽配信のご提案
ストリーミング音楽配信のご提案ストリーミング音楽配信のご提案
ストリーミング音楽配信のご提案大充 森田
 
IT活用のご提案〜ペットライフ〜
IT活用のご提案〜ペットライフ〜IT活用のご提案〜ペットライフ〜
IT活用のご提案〜ペットライフ〜Ryota Aoki
 

Destacado (20)

Ces2012 0125
Ces2012 0125Ces2012 0125
Ces2012 0125
 
GitHubで見つかるFileMaker関連ソフトウェア
GitHubで見つかるFileMaker関連ソフトウェアGitHubで見つかるFileMaker関連ソフトウェア
GitHubで見つかるFileMaker関連ソフトウェア
 
Bing Search API 使ってみました
Bing Search API 使ってみましたBing Search API 使ってみました
Bing Search API 使ってみました
 
Zetta: An API First Platform
Zetta: An API First PlatformZetta: An API First Platform
Zetta: An API First Platform
 
Generos musicales 11
Generos musicales 11Generos musicales 11
Generos musicales 11
 
Ben Hill - Develop Indie Dev Day Presentation
Ben Hill - Develop Indie Dev Day PresentationBen Hill - Develop Indie Dev Day Presentation
Ben Hill - Develop Indie Dev Day Presentation
 
#SPSLondon - Session 1 - Building an faq for end users
#SPSLondon - Session 1 - Building an faq for end users#SPSLondon - Session 1 - Building an faq for end users
#SPSLondon - Session 1 - Building an faq for end users
 
Iw411 migrating content by search from 2010 into 2013 - minified
Iw411   migrating content by search from 2010 into 2013 - minifiedIw411   migrating content by search from 2010 into 2013 - minified
Iw411 migrating content by search from 2010 into 2013 - minified
 
SPSBE building an faq for end users
SPSBE building an faq for end usersSPSBE building an faq for end users
SPSBE building an faq for end users
 
тунец бонито
тунец бонитотунец бонито
тунец бонито
 
TAS 2016- Akshay Thapliyal
TAS 2016- Akshay ThapliyalTAS 2016- Akshay Thapliyal
TAS 2016- Akshay Thapliyal
 
สอบ
สอบสอบ
สอบ
 
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...
Creating an FAQ for end users, An evolution of an idea - SharePoint Saturday ...
 
Onlanta
OnlantaOnlanta
Onlanta
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITPros
 
Merchant app
Merchant appMerchant app
Merchant app
 
Edison色々試してみた
Edison色々試してみたEdison色々試してみた
Edison色々試してみた
 
ストリーミング音楽配信のご提案
ストリーミング音楽配信のご提案ストリーミング音楽配信のご提案
ストリーミング音楽配信のご提案
 
IT活用のご提案〜ペットライフ〜
IT活用のご提案〜ペットライフ〜IT活用のご提案〜ペットライフ〜
IT活用のご提案〜ペットライフ〜
 

Similar a Spsbe using js-linkanddisplaytemplates

Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Mikael Svenson
 
SharePoint 2013 Sandbox Solutions for On Premise or Office 365
SharePoint 2013 Sandbox Solutions for On Premise or Office 365SharePoint 2013 Sandbox Solutions for On Premise or Office 365
SharePoint 2013 Sandbox Solutions for On Premise or Office 365Ed Musters
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...SPTechCon
 
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 20132013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 2013Wes Preston
 
Drew madelung sp designer workflows - sp-biz
Drew madelung   sp designer workflows - sp-bizDrew madelung   sp designer workflows - sp-biz
Drew madelung sp designer workflows - sp-bizDrew Madelung
 
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019Drew Madelung
 
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the EnterpriseEnvision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the EnterpriseEnvision IT
 
Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Lee Klement
 
Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsEric Overfield
 
Maintainable Sitecore Solutions
Maintainable Sitecore SolutionsMaintainable Sitecore Solutions
Maintainable Sitecore SolutionsThomas Eldblom
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePointTalbott Crowell
 
Spsbe buildinganfaqforendusers-150422122027-conversion-gate02
Spsbe buildinganfaqforendusers-150422122027-conversion-gate02Spsbe buildinganfaqforendusers-150422122027-conversion-gate02
Spsbe buildinganfaqforendusers-150422122027-conversion-gate02BIWUG
 
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JSCross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JSThomas Daly
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017Marc D Anderson
 
Cross Site Collection Navigation
Cross Site Collection NavigationCross Site Collection Navigation
Cross Site Collection NavigationThomas Daly
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
Your Intranet, Your Way
Your Intranet, Your WayYour Intranet, Your Way
Your Intranet, Your WayD'arce Hess
 

Similar a Spsbe using js-linkanddisplaytemplates (20)

Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013
 
SharePoint 2013 Sandbox Solutions for On Premise or Office 365
SharePoint 2013 Sandbox Solutions for On Premise or Office 365SharePoint 2013 Sandbox Solutions for On Premise or Office 365
SharePoint 2013 Sandbox Solutions for On Premise or Office 365
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
 
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 20132013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
 
Drew madelung sp designer workflows - sp-biz
Drew madelung   sp designer workflows - sp-bizDrew madelung   sp designer workflows - sp-biz
Drew madelung sp designer workflows - sp-biz
 
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
 
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the EnterpriseEnvision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
 
Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012
 
Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding options
 
Maintainable Sitecore Solutions
Maintainable Sitecore SolutionsMaintainable Sitecore Solutions
Maintainable Sitecore Solutions
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
 
Spsbe buildinganfaqforendusers-150422122027-conversion-gate02
Spsbe buildinganfaqforendusers-150422122027-conversion-gate02Spsbe buildinganfaqforendusers-150422122027-conversion-gate02
Spsbe buildinganfaqforendusers-150422122027-conversion-gate02
 
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JSCross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
 
Cross Site Collection Navigation
Cross Site Collection NavigationCross Site Collection Navigation
Cross Site Collection Navigation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Your Intranet, Your Way
Your Intranet, Your WayYour Intranet, Your Way
Your Intranet, Your Way
 

Más de Paul Hunt

Exploring conditional access to content stored in Office 365 - SPS Helsinki
Exploring conditional access to content stored in Office 365 - SPS HelsinkiExploring conditional access to content stored in Office 365 - SPS Helsinki
Exploring conditional access to content stored in Office 365 - SPS HelsinkiPaul Hunt
 
Exploring conditional access to content stored in office 365 spsce
Exploring conditional access to content stored in office 365   spsceExploring conditional access to content stored in office 365   spsce
Exploring conditional access to content stored in office 365 spscePaul Hunt
 
Exploring conditional access to content stored in Office 365
Exploring conditional access to content stored in Office 365Exploring conditional access to content stored in Office 365
Exploring conditional access to content stored in Office 365Paul Hunt
 
What do you mean 90 days isnt enough
What do you mean 90 days isnt enoughWhat do you mean 90 days isnt enough
What do you mean 90 days isnt enoughPaul Hunt
 
Spsnl18 exploring identity management options in office 365
Spsnl18   exploring identity management options in office 365Spsnl18   exploring identity management options in office 365
Spsnl18 exploring identity management options in office 365Paul Hunt
 
Spunite exploring identity management options in office 365
Spunite   exploring identity management options in office 365Spunite   exploring identity management options in office 365
Spunite exploring identity management options in office 365Paul Hunt
 
Making auditing great again! Office 365
Making auditing great again! Office 365Making auditing great again! Office 365
Making auditing great again! Office 365Paul Hunt
 

Más de Paul Hunt (7)

Exploring conditional access to content stored in Office 365 - SPS Helsinki
Exploring conditional access to content stored in Office 365 - SPS HelsinkiExploring conditional access to content stored in Office 365 - SPS Helsinki
Exploring conditional access to content stored in Office 365 - SPS Helsinki
 
Exploring conditional access to content stored in office 365 spsce
Exploring conditional access to content stored in office 365   spsceExploring conditional access to content stored in office 365   spsce
Exploring conditional access to content stored in office 365 spsce
 
Exploring conditional access to content stored in Office 365
Exploring conditional access to content stored in Office 365Exploring conditional access to content stored in Office 365
Exploring conditional access to content stored in Office 365
 
What do you mean 90 days isnt enough
What do you mean 90 days isnt enoughWhat do you mean 90 days isnt enough
What do you mean 90 days isnt enough
 
Spsnl18 exploring identity management options in office 365
Spsnl18   exploring identity management options in office 365Spsnl18   exploring identity management options in office 365
Spsnl18 exploring identity management options in office 365
 
Spunite exploring identity management options in office 365
Spunite   exploring identity management options in office 365Spunite   exploring identity management options in office 365
Spunite exploring identity management options in office 365
 
Making auditing great again! Office 365
Making auditing great again! Office 365Making auditing great again! Office 365
Making auditing great again! Office 365
 

Último

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Spsbe using js-linkanddisplaytemplates

  • 1. Using JSLink and Display Templates with the List View Web Part for ITPros #SPSBE23 Paul Hunt April 26th, 2014
  • 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 • www.myfatblog.co.uk • www.trinityservice.co.uk
  • 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.
  • 7.
  • 8. What did we used to do? • We used SPD and the Design View  We did conditional formatting  Played with colours  Injected Hyperlinks
  • 9. What did we used to do? • But  No design view anymore!
  • 10. What did we used to do? • We used XSLT Overrides (Still exist, but deprecated!)
  • 11. What did we used to do? • We used XSLT Overrides (Still exist, but deprecated!)  Which took boring list data views
  • 12. What did we used to do? • We used XSLT Overrides (Still exist, but deprecated!)  And transformed them into engaging visual representations
  • 13. 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
  • 14. So why the focus on Client Side Rendering?
  • 15. • 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?
  • 16. • 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! So why the focus on Client Side Rendering?
  • 17. 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
  • 18.
  • 19. 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
  • 20. These 4 relate to Search.
  • 21.
  • 22. 22
  • 23. 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
  • 24. Page Lifecycle – The Foundations
  • 25. Page lifecycle – The Foundations • SharePoint outputs JSLink in the Header of the page  This registers our Display Template
  • 26. Page lifecycle – The Foundations • SharePoint LVWP outputs the list data into the page  JSON Object Format
  • 27. Page lifecycle – The Foundations • And finally after setting things up  Calls the RenderListView() function for the web part. • Which in turn: – Calls the GetTemplates()
  • 28. Page lifecycle – The Result • Which compares the Context object to the list of registered overrides • And if everything is in place, our override wins the battle!
  • 29.
  • 30. ###CALLOUT – Internal Name Pain • Creating your fields carefully will save you pain!
  • 31. ###CALLOUT – Internal Name Pain • Creating your fields carefully will save you pain! • Internal names get encoded once, then URL encoded when displayed. • The displayed name The%5Fx0020%5Fnumber%5Fx0020%5Fof%5Fx0020%5F • Is actually an internal name of: The_x0020_number_x0020_of_x0020_
  • 32. ###CALLOUT – Internal Name Pain • Creating your fields carefully will save you pain! • Multiple long field names lose meaning • The_x0020_number_x0020_of_x0020_ • The_x0020_number_x0020_of_x0020_0
  • 33.
  • 34. Anatomy of a List View Display Template• Start with an empty .JS (Or copy example templates) • Define a Function to register the Display Template • Define the Function called by the Display Template for each item. • Call the register function
  • 35. 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
  • 36. 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 – Beware the double encoding issue! • Or using the browser debugger
  • 37. Anatomy of a List View Display Template• Call the function we defined when the page loads.
  • 38. 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
  • 39. Anatomy of a Field Rendering Display Template• The render function is similar to the list view item function
  • 40. How do we use them with List Views? • First we need to upload/create them in the MasterPage gallery
  • 41. How do we use them with List Views? • Set some metadata
  • 42. 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 |
  • 43.
  • 44. How do we troubleshoot? • IE Developers Toolbar (Other debuggers exist!)
  • 45. How do we troubleshoot? • Fiddler – HTTP Proxy
  • 46. How do we troubleshoot? • Fiddler – HTTP Proxy
  • 48. There has to be a catch? • Minimal Download Strategy • Multiple list views on a page • Changing SharePoint functionality
  • 49. 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
  • 50. 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/JSLinkIssues
  • 51. 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.
  • 52.
  • 54. 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 54
  • 55. Don’t forget SharePint! • SHARE·PINT: [SHAIR-PAHYNT] Noun 1. An assembly or meeting in relation to Microsoft SharePoint, accompanied with an alcoholic beverage.

Notas del editor

  1. Template may not be modified Twitter hashtag: #spsbe for all sessions
  2. I also do woodturning! SharePoint can be a lot like woodturning.. If you don’t pay attention to what you’re doing, it’s easy to make a mistake and go through the bottom of the bowl!
  3. This session is all about dropping a list view web part on the page and doing something visually with it using the tools that Microsoft provide and no serious custom development. A lot of what you see about display templates on the web is all about the Search Web Parts.. We’re not looking at those today!
  4. We’re targeting First/Second Tier developers.. That’s the UI and Client side to you and me..You’ll need to know Javascript, HTML and CSS..But not a lot, start small and work up!
  5. Primarily we worked server sideThough Marc Anderson and others championed what could be done client side with jQuery and similar
  6. The design view has now gone.Lots of discussion as to why.Can’t now use (in visual design mode):-the conditional format builderThe xPath expression builderWeb part connectionsWeb Part filters
  7. We did use XSLT over ridesDifficult to troubleshootA single wrong character could break the rendering! Very difficult to troubleshoot without access to the ULS logs (Or even with the logs!)
  8. This example is a project status dashboard, fed from a project list.
  9. But these bring their own headaches.Deployment,SupportUpgrades
  10. In my opinion it’s about the cloud.MS wants to offer a platform that’sscalable.Moving the customisations as far away from that platform makes sense..
  11. A large majority of Business and Home PC’s spend a massive amount of their time doing nothing.Several large Grid computing projects rely on thisNotably Folding@Home looking at causes of Cancer and other Degenerative diseases.And Seti@Home searching Radio Telescope signals for signs of ET!
  12. Warning though, Some small format PC’s may struggle.I’ve had personal issues with ARM processor based systems
  13. Cross-platform: Some browsers have different ways of handling some javascript.The use of jQuery helps alleviate this
  14. You can find them in the MasterPagecatalog /Display Templates subfolder
  15. Note: I added this page after the Stockholm event in response to a question that was posed to me after the event.List View Display Templates are JavaScript from start to finish.There is no requirement to embed the properties in the same way (But the field you want MUST be in the list view!).Everything you need should be available through the CTX context object passed in when called.
  16. Before we jump into how a display template is created, a note on Field Naming!Create your fields with a sensible name first and edit afterwards.This creates a short internal name for use in scripts.
  17. Note how the Space in names is encoded for the URL..The actual internal name is The_x0020_number_x0020_of_x0020_
  18. Note how the Space in names is encoded for the URL..The actual internal name is The_x0020_number_x0020_of_x0020_
  19. We’ll go through each step in the next few slides.
  20. BaseViewID & ListTemplateType both used to match the template requiredLoaded when the page is first processed.
  21. This function is called for EACH item the list will render. E.g. If you have a list view with 20 items, this function will run 20 times and each time ctx.CurrentItem will the next item in the list.Note: Fields called in the view MUST be selected when the view is created.Note: Field internal names that include encoded characters will be URL encoded too… A space becomes %5Fx0020%5F which is actually an internal name of _x0020_ (See next couple of slides!)
  22. We call our register function at the in the main script file. This ensures our functions are called.
  23. We only base this on BaseViewID,ListTemplateType has no impactThe field name is specified in the Templates collectionNote: We’re only affecting the View mode here.. But you can do Edit too.
  24. .
  25. You can do this directly through the UI,Or in SPD 2013, but they don’t have to be! File system, Asset library… anything works..
  26. This is good practice.. But not essential..they will work anyway!This just ensures they show up in the right place in Designer mostly!
  27. You can define List Views with JSLinks, or add them through PowerShellTokens courtesy of Martin Hatch’s blog~site – reference to the current SharePoint site (or “Web”)~sitecollection – reference to the current SharePoint site collection (or “Site”)~layouts – version specific reference to the web application Layouts folder (so it will automatically swap out /_layouts/14 or /_layouts/15 for you)~sitecollectionlayouts – reference to the layouts folder in the current site collection (e.g. /sites/team/_layouts/15)~sitelayouts – reference to the layouts folder in the current site (e.g. /sites/teams/subsite/_layouts/15)
  28. Setting up the Field render on SPSUK Tasks.~sitecollection/_catalogs/masterpage/Display Templates/csr_ovr_PercentComplete_Field.js
  29. Open the Developers Toolbar with F12Switch to the Script tagSelect the drop down near the “Start Debugging” buttonSelect our template fileStart Debugging
  30. In the normal flow, IE makes the request directly to SharePoint.Fiddler injects itself as a proxy between your browser requests and the outbound network connection.This allows us to inspect and event alter the requests and responses being made
  31. If time..one of the other benefits of fiddler is off-line editing.Using auto-responders, fiddler can return a LOCAL file instead of the server file.This can be a local copy of your display template that you are editing, thus NOT affecting the live site, butWorking with live data.
  32. Using the demo we created earlier, we’ll show how to trap the code and step through.http://msdn.microsoft.com/library/ie/bg182326(v=vs.85) The F12 developer tools site.
  33. Martin Hatches blog has more details on some of the other breaking issues with Display templates.
  34. If plenty of time (show the multiple list view issues)Tasks (If not done already)Average Temps (Charting)Belgian Beers – Styling, linked webparts, broken webpartsBelgian Beers – Set in powershellAbout My TeamGame ShowsOffice 365