how to change the search results are displayed

38
CHANGE HOW IT’S DISPLAYED with Search & Display Templates by Benjamin Niaulin, a SharePoint GEEK

Upload: sharegate

Post on 27-Jan-2017

435 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: How to Change the search results are displayed

CHANGE HOW IT’S DISPLAYED

with Search & Display Templates

by Benjamin Niaulin, a SharePoint GEEK

Page 2: How to Change the search results are displayed

@bniaulin

share-gate.com/blog

by Benjamin Niaulin, a SharePoint GEEK

Page 3: How to Change the search results are displayed

IS THIS GOING TO BE A DEV SESSION?

Page 4: How to Change the search results are displayed

BECAUSE I DON’T KNOW HOW TO CODE EITHER!

BUT I HAVE TO DELIVER SOLUTIONS IN SHAREPOINT AND THEY HAVE TO LOOK

GOOD TOO

NO

Page 5: How to Change the search results are displayed

SO WHAT ARE YOU GOING TO

SHOW US IN SHAREPOINT?

Page 6: How to Change the search results are displayed

TO FIND AND DISPLAY!

Page 7: How to Change the search results are displayed

GOOD, BECAUSE I AM HAVING SOME

ISSUES IN SHAREPOINT

2010

Page 8: How to Change the search results are displayed

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

Page 9: How to Change the search results are displayed

@bniaulin

Previous Solutions

Content Query Web Part

Search Coding

Page 10: How to Change the search results are displayed

@bniaulin

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) &gt; 0 and $ShowActionLinks"> <a type="application/rss+xml" href ="{$SrchRSSLink}" title="{$SrchRSSText}" id="SRCHRSSL" class="srch-ext-action-margin"> <img style="vertical-align: middle;" border="0" src="/_layouts/images/rss.gif" alt=""/> <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text> <xsl:value-of select="$SrchRSSText"/>

Page 11: How to Change the search results are displayed

@bniaulin

Page 12: How to Change the search results are displayed

YES! I AM SAYING

THERE IS SOMETHING BETTER OUT

THERE

Page 13: How to Change the search results are displayed

DON’T GET TOO

EXCITED

Page 14: How to Change the search results are displayed

FIRST…

What’s CHANGED

in SharePoint

2013?

Page 15: How to Change the search results are displayed

SEARCH!Best of FAST Search algorithms

Document ThumbnailsQuery Language (FQL)

Architecture

Visual Best Bets User Segmentation

Metadata Extraction

Continuous Crawl

Analytics

Result SourcesResult Types

Query RulesDisplay Templates

Search Web Parts

Cross-Site Publishing

Product Catalog Search-Drive Sites

Page 16: How to Change the search results are displayed

Continuous Crawl

Page 17: How to Change the search results are displayed

The Real Continuous Crawl

•Only works on SharePoint Content Sources

•By default every 15min

Set-SPEnterpriseSearchCrawlContentSource

•Once indexed, content appears almost right away...like magic

•Lots of added pressure on the Server

Page 18: How to Change the search results are displayed

Before we start ANYTHING with Search

Crawled Property: Content & Metadata extracted(document itself, url, Title, etc…)

Managed Property: Includes 1 or multiple mapped Crawled Properties and exists in the Search Index.

Managed Properties are what SharePoint uses to Display Content.

Page 19: How to Change the search results are displayed

POP QUIZ!

If I plan to use a Search-related Web Part

to show my content

What kind of Property should I use?

Page 20: How to Change the search results are displayed

MANAGED PROPERTY

Page 21: How to Change the search results are displayed
Page 22: How to Change the search results are displayed

SearchSearch Crawl

Content Search Web Part

Site Collection A

Site Collection B

CONTENT SEARCH

Page 23: How to Change the search results are displayed

Query Builder

Page 24: How to Change the search results are displayed

What’s changed?

Page 25: How to Change the search results are displayed

HTML CSS JS

NO XSLT

Page 26: How to Change the search results are displayed

DISPLAYTEMPLATES

Looking Good!

Page 27: How to Change the search results are displayed

The basics of Display Template

Page 28: How to Change the search results are displayed

They are everywhere

Page 29: How to Change the search results are displayed

The « container » 

Best way to reference custom files (JavaScript, CSS, etc…)

Control

Page 30: How to Change the search results are displayed

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

Page 31: How to Change the search results are displayed

Result Types

1 - One or more characteristics or conditions to compare each search result against, such as the result source or content type of the search result

Identify different types of results

2 - A display template to use for search results that meet the conditions.

Page 32: How to Change the search results are displayed

Finding

inspiration

line25.com

smashingmagazine.com

tympanus.net/codrops/

Page 33: How to Change the search results are displayed
Page 34: How to Change the search results are displayed
Page 35: How to Change the search results are displayed
Page 36: How to Change the search results are displayed

THINK

a reusable design

for Search Results

about it…

Page 37: How to Change the search results are displayed

ARTICLES

An Image Slider with Search Results Web Part

Responsive Animated Tiles Menu with Search Results

Learn more about different SharePoint topics

Page 38: How to Change the search results are displayed

@bniaulin

share-gate.com/blog

by Benjamin Niaulin, a SharePoint GEEKTHANK YOU!