SlideShare a Scribd company logo
Search Driven Solutions
Search Driven Solutions
April Dunnam
Please Be Courteous!
April Dunnam / SharePoint Developer
• Partner & Lead Consultant/Developer at
ThriveFast
• SharePoint junkie since 2007
• Blogger, Speaker
• Karaoke Queen
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Agenda
• Intro to Search
• Display Templates
• Components
• Pre-built templates
• Creating custom templates
• Content Search Web Part (CSWP)
• Feature Availability
• What is it?
• Query Builder
• Demo
• Search Results Web Part (SRWP)
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Intro to Search
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
A Case for Search
• Doesn’t require a developer most of the time
• Replaces need for custom development
• Less code
• Easily maintainable
• Better performance
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Performance Benefits
• Doesn’t require a call to the database like jQuery based solutions
• Reads from the search index rather than the database
• Get performance benefits of custom code without having to write
it
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Sounds Great But…
The Catch – Don’t Use If..
• If you don’t have SharePoint 2013 or SPO
• If you need real time
• Dependent on Search Crawl Schedule – More on this later
• You don’t have control over Managed Properties
• If you need to edit
• Search Web Parts are meant to be view only
• Not a forms solutions
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
What if you have SP 2010?
• Content Query Web Part
• Search Core Results Web Part
• Custom Code
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Search Crawls
• SPO
• MS controls Search Crawl scheduling and execution
• Search crawls occur continuously to make sure that content changes are
available through search results as soon as possible. Recently uploaded
documents may not immediately be displayed in search results because of
the time that’s required to process them. SharePoint Online targets
between 15 minutes and an hour for the time between upload and
availability in search results (also known as index freshness). In cases of
heavy environment use, this time can increase to six hours.
• On Premises
• SharePoint Admin can configure crawl schedule and can trigger an on-
demand crawl if you request it
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Search Components
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Crawled Properties
• Metadata that is extracted from documents/lists during crawls
• Can be structured content
• Title, Author, etc
• Or unstructured content
• Keywords, language, etc
• To make a crawled property available for search queries, you must
map the crawled property to a managed property
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Managed Properties
• Exists in the Search Index
• Grouping of one or more Crawled Properties
• Users can only search on managed properties and not on crawled
properties
• Must have access to Central Admin to create/modify
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Managed Property Settings
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Mapped Property Setting Description
Searchable Specifies that the managed property content can be found in the full-
text index
Queryable Enables querying against the specific managed property. Good if you
want to search for something specifically in a column. For example, if
the property is Department you could query “Department: Accounting”
Retrievable Enables the managed property content to be returned in search results
Refinable Enables the managed property to be used as a refiner for search results
Sortable Must be selected if you want to be able to sort (a-z) by this field in your
search solution
Search Tools
• SharePoint Search Query Tool
• https://sp2013searchtool.codeplex.com
• Works for SharePoint 2013 On-Prem and Online
• Simulate and debug queries
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
What’s a Display Template
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Display Template Overview
• JavaScript based content rendering template
• Transforms query results into custom format
• Uses Client Side Rendering (CSR)
• Doesn’t require you work with XSLT anymore
• Create and edit HTML files while SharePoint handles the JS
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Display Template Components
• Control
• Container for the search results
• Item
• Controls what happens to each item
rendered through the query
• Used once per result
• Use Managed Properties here to
display content
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Where are they located
• Located in the Master Page Gallery
• /_catalogs/masterpage/display templates
• Content Search Folder
• Search Folder
• Each template will include a .html and a .js file
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Tips/Warnings
• Create a new folder to upload custom templates to
• Separates them from the out-of-the-box templates
• Easier to find
• Don’t touch the JS file
• Customize the HTML file only!
• Never modify an Out-Of-The-Box Display Template!
• Make a copy of it if you want to use it as a starting point to customize
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Pre-Built Display Templates
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Some Cool Display Templates
• ShareGate
• Animated Menu - http://en.share-gate.com/blog/sharepoint-2013-
animated-menu-search-display-template
• Image Menu - http://en.share-gate.com/blog/sharepoint-display-template
• Image Slider - http://en.share-gate.com/blog/image-slider-with-
sharepoint-2013-search-results
• Corporate Directory - http://en.share-gate.com/blog/corporate-directory-
sharepoint-search
• SharePoint Client Side Repository (SPCSR)
• https://github.com/SPCSR/DisplayTemplates
• My Stuff
• https://github.com/aprildunnam/DisplayTemplates
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Creating Display Templates
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Create a Display Template
• Start from an existing template
• Make a copy of the .html of an existing template
• If you have publishing enabled then SharePoint will create the JS for you
• If you don’t have publishing enabled then you will need to copy both the
.html and js
• Make sure to change the <title> tag to the name of your new
template
• Modify the code to fit your needs
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Display Template
DEMO
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Content Search Web Part
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Feature Availability
• The Content Search Web Part (CSWP) is only available for the
following licenses:
• SharePoint 2013 On-Prem Enterprise License
• SharePoint Online Plan 2 (Office 365 E3/E4/E5)
• Don’t have an Enterprise License?
• You can still use the Search Result Web Part (SRWP) and get similar functionality
(kind of)
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Functionality Matrix
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Functionality CSWP SRWP
Property Mappings w/ Web Part settings X -
Don’t show anything if no results X X (Requires custom control template)
Start displaying results from specified result # X X
Caching Support X -
Support Content Routing, choosing result table X -
Paging support X X
Refine/Filter Results X X
Note: Adapted from “Content Search WebPart vs Search Results Web Part” by ITUnity
Content Search Building Blocks
• The Content Search Web Part is comprised of 2 elements:
1. Query Builder
Gathers your data
2. Display Template
Beautifies the output
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Query Builder
• Where you define what data to show
• Can search across site collections &
subsites
• Examples:
• Query all subsites
• Query for data from a specific list
• Query for all pictures
• Query for all people
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Built-in Templates
• Multiple default templates to
choose from
• Built-in Slideshow functionality
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
CSWP Default Slider
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Property Mapping
• Where you define what data to show
• Map the managed properties to the
corresponding line in the display
template
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Content Search Web Part (CSWP)
DEMO
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Search Results Web Part
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Search Results Web Part
• Use this if you don’t have access to the CSWP
• Can accomplish all of the same functionality as CSWP
• Requires more code and configuration
• Doesn’t have property mappings
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Search Results Web Part
DEMO
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Provisioning
• Suggest creating/editing your display templates in a test
environment if possible
• If you have publishing enabled:
• Copy your .html file and any corresponding css/images to your production
master page gallery/display templates folder
• If you don’t have publishing enabled:
• Copy both the .html and .js and any corresponding css/images to your
production master page gallery/display templates folder
What did we learn kids?
• Content Search Web Part is cool
• Search Results Web Part is there for you if you don’t have the
licensing for CSWP
• If your on SharePoint 2010 or Below upgrade to 2013 so you can
reap the benefits
• Lots of out-of-the box templates available
• Cool templates out there to download (for free)
• Puts the power in your hands & eliminates the need for custom
code
Thank You
@2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
Please Complete An Evaluation
Form
Your input is important!
You can access Evaluation Forms at:
http://TulsaTechFest.com
Search Driven Solutions

More Related Content

PPTX
Quick & Easy SharePoint Forms with StratusForms
PPTX
Tulsa Tech Fest - SharePoint 2013: Intro To Branding & Design Manager
PPTX
Tulsa techfest awesomelysimplesharepointsolutions
PPTX
Powering Up SharePoint Forms with PowerApps
PDF
Next Level PowerApps SPS St Louis
PPTX
Next Level PowerApps
PPTX
PowerApps, Forms, Flow, oh my!
PPTX
Intro to PowerApps and Flow
Quick & Easy SharePoint Forms with StratusForms
Tulsa Tech Fest - SharePoint 2013: Intro To Branding & Design Manager
Tulsa techfest awesomelysimplesharepointsolutions
Powering Up SharePoint Forms with PowerApps
Next Level PowerApps SPS St Louis
Next Level PowerApps
PowerApps, Forms, Flow, oh my!
Intro to PowerApps and Flow

What's hot (20)

PPTX
Powering the Modern Classroom with PowerApps & PowerBI
PPTX
My First SharePoint Online PowerApp
PPTX
Tulsa techfest awesomelysimplesharepointsolutions
PPTX
Share point development 101
PPTX
So you’re building an intranet
PPTX
InfoPath alternatives and the potential of PowerApps
PPTX
Bringing Zest to SharePoint Sites Using Out-of-the-Box Technology
PPTX
Tulsa TechFest 2015 Awesomely Simple SharePoint Solutions
PPTX
How to build SharePoint 2013 Killer Apps
PPTX
Zup Zip Share Point
PPTX
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
PPTX
SharePoint for Beginners
PPTX
Tulsa Tech Fest - SharePoint 2013 Lessons Learned
PPTX
Getting The Most Out Of SP Search SPSTC
PDF
Access Web Apps E-Book
PDF
Dynamic no-code mashups in SharePoint 2010 and 2013
PPTX
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
PPTX
Designing a great SharePoint Online intranet in Office 365
PDF
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...
PDF
SharePoint 101
Powering the Modern Classroom with PowerApps & PowerBI
My First SharePoint Online PowerApp
Tulsa techfest awesomelysimplesharepointsolutions
Share point development 101
So you’re building an intranet
InfoPath alternatives and the potential of PowerApps
Bringing Zest to SharePoint Sites Using Out-of-the-Box Technology
Tulsa TechFest 2015 Awesomely Simple SharePoint Solutions
How to build SharePoint 2013 Killer Apps
Zup Zip Share Point
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
SharePoint for Beginners
Tulsa Tech Fest - SharePoint 2013 Lessons Learned
Getting The Most Out Of SP Search SPSTC
Access Web Apps E-Book
Dynamic no-code mashups in SharePoint 2010 and 2013
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
Designing a great SharePoint Online intranet in Office 365
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...
SharePoint 101
Ad

Similar to Search Driven Solutions (20)

PPTX
Lets build a_search-based_application_in_share_point_2013_-_spsdc[2]
PPTX
Let’s build a_search-based_application_in_share_point_2013_-_baltimorespug
PDF
Spca2014 search workshop niaulin
PPTX
Leveraging SharePoint 2013 Search and CSR
PPTX
Building Search Driven Applications
PPTX
SPC.Org - SharePoint 2013 Search
PPT
Iw411 migrating content by search from 2010 into 2013 - minified
PPTX
Fried toronto sps14 91 wcm intranet
PPTX
ShareCafe SharePoint 2010 Search
PPTX
Managing and Troubleshooting SharePoint 2013 Search
PPTX
Enhancing Relevancy & User Experience with #SharePoint Search sps-philly 2015
PPTX
SharePoint 2013 Search Topology and Optimization
PPTX
Getting the most ouf of SharePoint Search - Tulsa SharePoint Interest Group
PDF
Exploring the New Search in SharePoint 2013 - What can you do now?
PDF
Build killer visuals to interact with your content using Search and Display T...
PPTX
SPSSTL - Building Search Driven Applications
PPTX
#SPSPhilly search topology & optimization
PDF
How to Change the search results are displayed
PPTX
Spsvb Developer Intro to SharePoint Search
PPTX
Spsvb Developer Intro to SharePoint Search
Lets build a_search-based_application_in_share_point_2013_-_spsdc[2]
Let’s build a_search-based_application_in_share_point_2013_-_baltimorespug
Spca2014 search workshop niaulin
Leveraging SharePoint 2013 Search and CSR
Building Search Driven Applications
SPC.Org - SharePoint 2013 Search
Iw411 migrating content by search from 2010 into 2013 - minified
Fried toronto sps14 91 wcm intranet
ShareCafe SharePoint 2010 Search
Managing and Troubleshooting SharePoint 2013 Search
Enhancing Relevancy & User Experience with #SharePoint Search sps-philly 2015
SharePoint 2013 Search Topology and Optimization
Getting the most ouf of SharePoint Search - Tulsa SharePoint Interest Group
Exploring the New Search in SharePoint 2013 - What can you do now?
Build killer visuals to interact with your content using Search and Display T...
SPSSTL - Building Search Driven Applications
#SPSPhilly search topology & optimization
How to Change the search results are displayed
Spsvb Developer Intro to SharePoint Search
Spsvb Developer Intro to SharePoint Search
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Chapter 3 Spatial Domain Image Processing.pdf
Electronic commerce courselecture one. Pdf
cuic standard and advanced reporting.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Modernizing your data center with Dell and AMD
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation_ Review paper, used for researhc scholars
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Search Driven Solutions

  • 4. April Dunnam / SharePoint Developer • Partner & Lead Consultant/Developer at ThriveFast • SharePoint junkie since 2007 • Blogger, Speaker • Karaoke Queen @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 5. Agenda • Intro to Search • Display Templates • Components • Pre-built templates • Creating custom templates • Content Search Web Part (CSWP) • Feature Availability • What is it? • Query Builder • Demo • Search Results Web Part (SRWP) @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 6. Intro to Search @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 7. A Case for Search • Doesn’t require a developer most of the time • Replaces need for custom development • Less code • Easily maintainable • Better performance @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 8. Performance Benefits • Doesn’t require a call to the database like jQuery based solutions • Reads from the search index rather than the database • Get performance benefits of custom code without having to write it @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 9. @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com Sounds Great But…
  • 10. The Catch – Don’t Use If.. • If you don’t have SharePoint 2013 or SPO • If you need real time • Dependent on Search Crawl Schedule – More on this later • You don’t have control over Managed Properties • If you need to edit • Search Web Parts are meant to be view only • Not a forms solutions @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 11. What if you have SP 2010? • Content Query Web Part • Search Core Results Web Part • Custom Code @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 12. Search Crawls • SPO • MS controls Search Crawl scheduling and execution • Search crawls occur continuously to make sure that content changes are available through search results as soon as possible. Recently uploaded documents may not immediately be displayed in search results because of the time that’s required to process them. SharePoint Online targets between 15 minutes and an hour for the time between upload and availability in search results (also known as index freshness). In cases of heavy environment use, this time can increase to six hours. • On Premises • SharePoint Admin can configure crawl schedule and can trigger an on- demand crawl if you request it @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 13. Search Components @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 14. Crawled Properties • Metadata that is extracted from documents/lists during crawls • Can be structured content • Title, Author, etc • Or unstructured content • Keywords, language, etc • To make a crawled property available for search queries, you must map the crawled property to a managed property @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 15. Managed Properties • Exists in the Search Index • Grouping of one or more Crawled Properties • Users can only search on managed properties and not on crawled properties • Must have access to Central Admin to create/modify @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 16. Managed Property Settings @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com Mapped Property Setting Description Searchable Specifies that the managed property content can be found in the full- text index Queryable Enables querying against the specific managed property. Good if you want to search for something specifically in a column. For example, if the property is Department you could query “Department: Accounting” Retrievable Enables the managed property content to be returned in search results Refinable Enables the managed property to be used as a refiner for search results Sortable Must be selected if you want to be able to sort (a-z) by this field in your search solution
  • 17. Search Tools • SharePoint Search Query Tool • https://sp2013searchtool.codeplex.com • Works for SharePoint 2013 On-Prem and Online • Simulate and debug queries @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 18. What’s a Display Template @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 19. Display Template Overview • JavaScript based content rendering template • Transforms query results into custom format • Uses Client Side Rendering (CSR) • Doesn’t require you work with XSLT anymore • Create and edit HTML files while SharePoint handles the JS @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 20. Display Template Components • Control • Container for the search results • Item • Controls what happens to each item rendered through the query • Used once per result • Use Managed Properties here to display content @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 21. Where are they located • Located in the Master Page Gallery • /_catalogs/masterpage/display templates • Content Search Folder • Search Folder • Each template will include a .html and a .js file @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 22. Tips/Warnings • Create a new folder to upload custom templates to • Separates them from the out-of-the-box templates • Easier to find • Don’t touch the JS file • Customize the HTML file only! • Never modify an Out-Of-The-Box Display Template! • Make a copy of it if you want to use it as a starting point to customize @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 23. Pre-Built Display Templates @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 24. Some Cool Display Templates • ShareGate • Animated Menu - http://en.share-gate.com/blog/sharepoint-2013- animated-menu-search-display-template • Image Menu - http://en.share-gate.com/blog/sharepoint-display-template • Image Slider - http://en.share-gate.com/blog/image-slider-with- sharepoint-2013-search-results • Corporate Directory - http://en.share-gate.com/blog/corporate-directory- sharepoint-search • SharePoint Client Side Repository (SPCSR) • https://github.com/SPCSR/DisplayTemplates • My Stuff • https://github.com/aprildunnam/DisplayTemplates @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 25. Creating Display Templates @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 26. Create a Display Template • Start from an existing template • Make a copy of the .html of an existing template • If you have publishing enabled then SharePoint will create the JS for you • If you don’t have publishing enabled then you will need to copy both the .html and js • Make sure to change the <title> tag to the name of your new template • Modify the code to fit your needs @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 27. Display Template DEMO @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 28. Content Search Web Part @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 29. Feature Availability • The Content Search Web Part (CSWP) is only available for the following licenses: • SharePoint 2013 On-Prem Enterprise License • SharePoint Online Plan 2 (Office 365 E3/E4/E5) • Don’t have an Enterprise License? • You can still use the Search Result Web Part (SRWP) and get similar functionality (kind of) @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 30. Functionality Matrix @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com Functionality CSWP SRWP Property Mappings w/ Web Part settings X - Don’t show anything if no results X X (Requires custom control template) Start displaying results from specified result # X X Caching Support X - Support Content Routing, choosing result table X - Paging support X X Refine/Filter Results X X Note: Adapted from “Content Search WebPart vs Search Results Web Part” by ITUnity
  • 31. Content Search Building Blocks • The Content Search Web Part is comprised of 2 elements: 1. Query Builder Gathers your data 2. Display Template Beautifies the output @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 32. Query Builder • Where you define what data to show • Can search across site collections & subsites • Examples: • Query all subsites • Query for data from a specific list • Query for all pictures • Query for all people @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 33. Built-in Templates • Multiple default templates to choose from • Built-in Slideshow functionality @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 34. CSWP Default Slider @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 35. Property Mapping • Where you define what data to show • Map the managed properties to the corresponding line in the display template @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 36. Content Search Web Part (CSWP) DEMO @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 37. Search Results Web Part @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 38. Search Results Web Part • Use this if you don’t have access to the CSWP • Can accomplish all of the same functionality as CSWP • Requires more code and configuration • Doesn’t have property mappings @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 39. Search Results Web Part DEMO @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 40. Provisioning • Suggest creating/editing your display templates in a test environment if possible • If you have publishing enabled: • Copy your .html file and any corresponding css/images to your production master page gallery/display templates folder • If you don’t have publishing enabled: • Copy both the .html and .js and any corresponding css/images to your production master page gallery/display templates folder
  • 41. What did we learn kids? • Content Search Web Part is cool • Search Results Web Part is there for you if you don’t have the licensing for CSWP • If your on SharePoint 2010 or Below upgrade to 2013 so you can reap the benefits • Lots of out-of-the box templates available • Cool templates out there to download (for free) • Puts the power in your hands & eliminates the need for custom code
  • 42. Thank You @2016 ThriveFast | www.thrivefast.com @aprildunnam | www.sharepointsiren.com
  • 43. Please Complete An Evaluation Form Your input is important! You can access Evaluation Forms at: http://TulsaTechFest.com

Editor's Notes

  • #2: Hey guys how’s it going? Let’s thank the sponsors for the pizza for lunch.
  • #3: In this session I will be talking about ways to utilize search-based web parts to build out a dynamic intranet. This session targets power users to developers.
  • #4: We don't wanna hear your "MMMBop" ringtone go off
  • #6: I will do a brief intro to search itself. Next I will talk about Display Templates. I will not go into too much code here and instead will focus on some already built templates available for you to use.
  • #8: Where in the past you might have used something like SPServices to query data from a SharePoint list or library you can do the same thing with search web parts. You’ll find that you can implement a search based solution without the need of a developer 80% of the time. There are a lot of out-of-the-box and free templates out there that are ready for a power user to install and use. There may be some cases where you need the output to be different in which case you can enlist the help of a developer to build out a custom template.
  • #9: So we said Search Driven Solutions offer better performance but what do we mean by that? A big hit on performance is having to make multiple calls to the database. jQuery based solutions that make list calls require a call to the database. If you need to pull information from multiple lists on your intranet home page then those database calls can add up and bring your load time to a hault. With a search based solution, you aren’t calling the database but rather the search index which acts as a cache. You do still have some options you can use a Content Query Web Part or Search Core Results Web Part or just regular old custom code. Unfortunately these options aren’t as user friendly and you will most likely need a developers help
  • #10: While search is great there are some instances where it might not be the best fit. One limitation is the data won’t show up instantaneously. After you add new content you will have to wait for search to crawl that content before it’s displayed. The time it takes search to crawl varies. If you are on-prem your SP Admin configures the crawl schedule which can vary from every 5 minutes to every hour or more. A benefit of on-prem is you can also request your SP Admin to kick off an on-demand crawl for you as well. If you are on Office 365 then you are at Microsoft’s mercy. Generally the crawl runs every 15 minutes, however, during “peak load times” it can take as long as 6 hours. I’ve personally never seen it take that long though. Another case where you might not want to use a search based solution is if you don’t have control over managed properties. Search based solutions are dependent on these managed properties as that is where it gets it’s data. Managed Properties are controlled via Central Admin so if you don’t have that access it’s going to be difficult. There are many managed properties already configured and generally, each time you create a Site Column it creates a corresponding managed property for that. However, you might need some configuration such as setting the property to be filterable, searchable, sortable, etc. I’ll explain what a managed property is in the next slide. Another important thing to note is search based solutions are not meant to be a forms solution alternative. These solutions will generally be read only.
  • #11: While search is great there are some instances where it might not be the best fit. One limitation is the data won’t show up instantaneously. After you add new content you will have to wait for search to crawl that content before it’s displayed. The time it takes search to crawl varies. If you are on-prem your SP Admin configures the crawl schedule which can vary from every 5 minutes to every hour or more. A benefit of on-prem is you can also request your SP Admin to kick off an on-demand crawl for you as well. If you are on Office 365 then you are at Microsoft’s mercy. Generally the crawl runs every 15 minutes, however, during “peak load times” it can take as long as 6 hours. I’ve personally never seen it take that long though. Another case where you might not want to use a search based solution is if you don’t have control over managed properties. Search based solutions are dependent on these managed properties as that is where it gets it’s data. Managed Properties are controlled via Central Admin so if you don’t have that access it’s going to be difficult. There are many managed properties already configured and generally, each time you create a Site Column it creates a corresponding managed property for that. However, you might need some configuration such as setting the property to be filterable, searchable, sortable, etc. I’ll explain what a managed property is in the next slide. Another important thing to note is search based solutions are not meant to be a forms solution alternative. These solutions will generally be read only.
  • #12: If you are still on SP 2010 then what we are going to discuss won’t do you much good. My humble suggestion would be to upgrade to 2013 if you can so you can take advantage of the new search features. You do still have some options you can use a Content Query Web Part or Search Core Results Web Part or just regular old custom code. Unfortunately these options aren’t as user friendly and you will most likely need a developers help
  • #13: Re-iterating what we discussed in the previous slide. The official statement from Microsoft for SharePoint online is listed. Again, I’ve yet to see it take that long to crawl though but its important to be aware. On-Prem search crawls are typically controlled by your SharePoint Admin. The crawl schedule can vary from 15 minutes to once a day. If you have on-prem SharePoint and want to implement a search-based solution it would be a good idea to check with your SharePoint Administrator and see how often your crawl schedule runs so you’ll know if that will fit with your intended solutions.
  • #15: There are a couple major components of search that you need to be aware of to utilize search web parts. The first is Crawled Properties. For each site column that is created and used SharePoint will automatically create a corresponding Crawled Property for the column. It’s important to note that the column has to have data in it before this happens though. Crawled Properties are the building blocks of Managed Properties which are vital to using search web parts.
  • #16: If you are doing anything with search you will need to use Managed Properties. Search looks at managed properties for building the queries and displaying data.
  • #17: There are some settings for Managed Properties that are important to know before building out a search-based solution. For each managed property, you must define the settings. These settings will determine what you are allowed to do with the given property.
  • #18: When working with search solutions you will eventually run into an issue and need to troubleshoot your query. Luckily there is a good, free tool for that. This tool can be downloaded on your desktop and can connect to you online or on-prem site. It allows you to stub out and debug queries.
  • #20: Display templates are what makes your Search Queries look pretty.
  • #21: Display Templates consist of a Control and an Item. The control is your container for the search results. The Item is the manipulation of each search result item.
  • #22: You can find all of the display templates in the master page gallery. There are two folders. One for Content Search and another for Search. If you are using Search Results Web Part then you’ll want to put your custom display templates in the Search folder. If you are using the Content Search Web Part then put your custom display templates in the Content Search Web Part.
  • #23: Some general tips and warnings here. First, I suggest creating a new folder under the display template folder to house all of your custom templates. This separates them from the out of the box templates and makes them easier to find and manage. Next tips will save you some heartache. Unless you are a JS whiz, never touch the JS file! You should typically only be customizing the HTML file. SharePoint will automatically sync any changes you make to the HTML with the JS file to keep it kosher. You run the risk of breaking stuff if you start editing the JS file even if you know what you’re doing. If you really need to modify the JS file then I suggest making a backup of your template first. Last tip is to never modify and out of the box display template. Same idea as above, if you mess it up then bad stuff can happen. You have no good way of knowing where that template is being used and stuff can break. The safe bet is to make a copy of it and give it a unique name and customize it from there.
  • #25: Benjamin Nulin from ShareGate is big on Search and he has created several cool templates that are available for you to download. I’ve used some of his templates which I will show you later on in the demo. There is also a project out on GitHub which has a ton of display templates out there for you. I personally want to check out the accordion display template. And lastly, I’ve posted the display templates that I’ve customized out on my github.
  • #27: I’m not going to go into the code of heavily customizing a display template. Instead I’m going to focus on some of the readily available templates out there. If you want to create your own, as I said before, start with an existing, make a copy and modify to suite your needs. I will show you an example of what the code of a display template looks like and how we can make a copy and make a small change easily in the demo next.
  • #28: Show how to make a copy of an existing template and make a small change to customize.
  • #29: So now that we’ve went over how to get some cool display templates to utilize in your search web parts we are going to talk about the web parts themselves and how to configure them to display content. The first web part we are going to talk about is the Content Search Web Part
  • #30: This may be a major bummer to some of you but the Content Search Web Part is only available for SP 2013 On-Prem Enterprise of SP Online Plan 2. Don’t be discouraged if you don’t have that licensing. You can accomplish similar functionality with the Search Results Web Part that we’ll discuss later on.
  • #31: It’s really a case of “anything you can do I can do better”. The CSWP is the latest and greatest and can do anything the SRWP can do faster and easier. The major benefit that you’ll see with the Content Search Web Part is you can utilize property mappings within the web part settings itself. This means your display template just has a placeholder for a value and the end user can define that value in the web part. Whereas with the SRWP you will have to define the properties in the display template itself.
  • #32: The CSWP is comprised of two basic elements. The Query and the Template.
  • #33: The Query Builder is pretty self explanatory, you define what you want search to display. The cool thing about the CSWP is you can search across site collections. Many companies have multiple SharePoint site collection and in the past it was extremely difficult to aggregate data from those site collections into one place. You can do that with search.
  • #34: We’ve already talk about display templates. You’ll see with the CSWP that you have a lot of templates there for you to use out of the box. It even has an image slider built in for you.
  • #36: As I said before a big benefit of the CSWP is the ability to map properties. In this example you’ll see it has a placeholder to choose the field to use for the picture, link, title, and description.
  • #37: Show the home page and how to add a CSWP. Create a query and choose a display template.
  • #38: So what if you don’t have the CSWP? There’s still the SRWP.
  • #40: Show how to add the People Directory Search Results Webpart
  • #41: The cool thing about search based solutions is they are super easy to provision. It’s just a matter of copying over some files.