This session was presented first in St. Louis. It's hard to get it by just reading the slides as much of it is through the presentation in person. Hope it helps
SharePoint 2013 Content search web part - Get it all in one place and style it!
1. Content Search Web Part
– Get it all in one place
and style it!
Benjamin Niaulin
Presented at: SharePoint Saturday St- SharePoint Geek
Louis
2. Description
We've always been limited to show items and documents
from our current site or Site Collection. In SharePoint 2013, a
new Web Part will make it easier to grab everything and style
it the way you want.
In this session, you will learn what this Web Part can do, the
various scenarios where it will help as well as how to change
the display of the results. Don't stay constrained to your
SharePoint site - Search it!
@bniaulin Share-gate.com
3. Who is this guy talking?
Benjamin Niaulin
Speaker, Trainer, Consultant, SCRUM Master
Blog
bniaulin.wordpress.com
Website
share-gate.com
Email
benjamin.niaulin@share-gate.com
TWITTER!: @bniaulin
@bniaulin Share-gate.com
4.
http://spsaturday.
azurewebsites.net
4 | SharePoint Saturday St. Louis 2013
5.
http://spsaturday. azurewebsites.net
5 | SharePoint Saturday St. Louis 2013
6. Thanks to Our Sponsors!
6 | SharePoint Saturday St. Louis 2013
7. Agenda
Introduction – Problems and Previous Solutions
Basics of Search 2013
Content Search Web Part – Intro
Introduction Demo
Overview of the Query Builder
Display Templates
Existing Content Search in SP2013
Licensing
Other solutions?
Cool Ideas – What this means for 2013
@bniaulin Share-gate.com
9. Problems we face
Showing data from multiple lists/libraries at the same time
Change the date format in a list/library
Contextual Results
Changing the look of what we are seeing
Accessing information from other Site Collections
@bniaulin Share-gate.com
10. Previous Solutions
Content Query Web Part
Search Coding
@bniaulin Share-gate.com
11. Wonderful XSLT
<xsl:template name="dvt_1.noKeyword">
<span class="srch-description2">
<xsl:choose>
<xsl:when test="$IsFixedQuery">
<xsl:value-of select="$NoFixedQuery" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$NoKeyword" />
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:template>
<!-- When empty result set is returned from search -->
<xsl:template name="dvt_1.empty">
<div class="srch-results">
<xsl:if test="string-length($SrchRSSLink) > 0 and $ShowActionLinks">
<a type="application/rss+xml" href ="{$SrchRSSLink}" title="{$SrchRSSText}" id="SRCHRS
@bniaulin Share-gate.com
margin">
13. What’s new?
FAST + SEARCH
Continuous Crawl
Content Search
Display Templates everywhere
HTML – no more XSLT
Search Results
Result Sources, Result Types…. Just an overall better Search
=
Search Driven Sites
@bniaulin Share-gate.com
21. What it does
Stored in “~sitecollection/_catalogs/masterpage/Display
Templates/”
Provides reusable displays for your Content
NO MORE XSLT! HTML and Javascript
Uses “Managed Properties” to show the content in right
<div>
@bniaulin Share-gate.com
22. Categories of Display Templates
Control
Similar to ContentQueryMain.xsl
Filter, Group and Hover Panel
Similar to Header.xsl +more
Item
Similar to
itemstyle.xsl
@bniaulin Share-gate.com
23. Control
The container for the
“Groups, Filters and
Items” to come
Best way to reference
custom files (JavaScript,
CSS, etc…)
@bniaulin Share-gate.com
24. Item
Controls what happens to
each item rendered
through the query
Use Managed Properties
to show the content you
want where you want
using HTML
@bniaulin Share-gate.com
25. Editing a Display Template
Always comes in 2; a HTML and JS file
NEVER edit the JS file – it is automatically generated
@bniaulin Share-gate.com
26. Editing a Display Template (2)
Very easy to understand and manipulate compared to
XSLT
Always best to copy an existing and work from there
Remember to only copy the HTML file, the JS is generated
Demo!
@bniaulin Share-gate.com
34. Cool!
Create dynamic
Home Pages or
Collaboration Sites
Render an entire
Web Page through
Content Search
Web Page is a
Search Result
contextual to
the user!
Cool!
@bniaulin Share-gate.com
36. THANK YOU!
KEEP IN TOUCH ON TWITTER @BNIAULIN
Blog
bniaulin.wordpress.com
Website
share-gate.com
Email
benjamin.niaulin@share-gate.com
Benjamin Niaulin
@bniaulin Share-gate.com