content in sharepoint 2013 eric overfield sharepoint advocate and enthusiast pixelmill integrating...

51
Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Upload: robert-bunyan

Post on 28-Mar-2015

231 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Content in SharePoint 2013

Eric OverfieldSharePoint Advocate and Enthusiast

PixelMill

Integrating Search Driven

Page 2: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Introduction – Eric Overfield

Founder and SharePoint Branding/UI Lead,

PixelMill

Speaker, Teacher, Advocate

Author, SharePoint Community Organizer

Located in Davis, CA

ericoverfield.com

@EricOverfield

Order Your Copy http://pxml.ly/zsqykd

Co-author: “Pro SharePoint 2013 Branding and

Responsive Web Development” (Apress – June

12th, 2013)

Co-author: “Black Magic

Solutions for White Hat

SharePoint” (August, 2013)

Page 3: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

What You Will Learn

Aggregate Content Across Sitescross-site publishing feature

Create Content Rollup Solutionscustom display templates

Customize Individual Search Results

result types

Fine-tune Search Queriesquery rules

@EricOverfield - pixelmill.com

Page 4: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Aggregate Content

Across Site(s)@EricOverfield - pixelmill.com

Page 5: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

Site Collection A

Search

Search Crawl

Content Query Web Part (CBQ)

Site Collection A

The Old Way

Site Collection B

Search

Search Crawl

Content Query Web Part (CBQ)

Site Collection B

Page 6: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

Site Collection A

SearchSearch Crawl

Content Search Web Part

Site Collection B

Site Collection C

Site Collection D

List of articles/documentsRecommendationsPopular items

The SharePoint 2013 Way

Page 7: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Demo Solution: What We Want to Build…

Scenario:

Show dynamic content

Show potential buyers

a rollup of all the

available Specter

Group properties for

sale

@EricOverfield - pixelmill.com

Page 8: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

Solution

Page 9: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Hold On… Important Prerequisites

Enterprise License Required

For Catalog creation and CBS

Depends on Search Indexer

@EricOverfield - pixelmill.com

Source site collection feature,

Cross-Site Collection Publishing must be

activated On-prem only – No O365 support yet

Page 10: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

And Limitations

Consuming site requires restricted read access on

authoring site

Because results can be security trimmed Cross site publishing only supports pages and lists

@EricOverfield - pixelmill.com

Content assets (videos, images, etc.) need to be on

assets site

Use Suggested Content Browser Location Results based on search index freshness

Page 11: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

What About Content Deployment?

Very different approach

Must be across content databases

@EricOverfield - pixelmill.com

Not based on search

May be used for similar reasons,

but apples to oranges comparison

Page 12: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonMy Content

@EricOverfield - pixelmill.com

Store it anywhere, across site

collections,

web applications or farms

Page 13: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Create a catalog

@EricOverfield - pixelmill.com

Page 14: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Managed Properties

Configured in Central Admin or Site

Collection

Search Schema Content has to have been crawled

@EricOverfield - pixelmill.com

Another full crawl after a new managed

property

Required to surface/retrieve new content

columns

Page 15: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonCreating Managed Properties

@EricOverfield - pixelmill.com

Page 16: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonGetting Content from a Catalog

@EricOverfield - pixelmill.com

1

2

3

Page 17: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonAggregate Content Review

@EricOverfield - pixelmill.com

We have source content -> catalog, stored anywhere (almost)Content has been crawled

Managed properties have been created

Prerequisites have been addressed (licenses and features)

Content has been crawled - again

Consuming site has been connected to catalog

Ready to display!

Page 18: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Content Rollup with the

Content Search Web Part

@EricOverfield - pixelmill.com

Page 19: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

The Content Search Web Part

(CBS)Getting the results:

Query Builder

Showing the results: Display Templates

Page 20: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonGet Dynamic Content with Query Builder

@EricOverfield - pixelmill.com

1

2 3

Page 21: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonShow Dynamic Content with Display Templates

@EricOverfield - pixelmill.com

Page 22: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Customize YourDisplay

Templates!@EricOverfield - pixelmill.com

Page 23: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonWhat Makes up a Display Template?

@EricOverfield - pixelmill.com

Control template

Item Template

HTML and JS

No more XSLT!

Retrieves Managed Properties

Page 24: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonCustom Display Templates

@EricOverfield - pixelmill.com

Add to Master

Page Gallery

Copy from an

existing display template

Use any editor

Page 25: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Implementing Custom Display Templates

Must specify all managed properties to surface

May externalize CSS and JS that template

needs

@EricOverfield - pixelmill.com

Inline JS must appear after the first <div>

Add HTML markup to render results

Page 26: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonA Look at the Code: Item Template

@EricOverfield - pixelmill.com

<mso:ManagedPropertyMapping msdt:dt="string"> 'LastModifiedTime':'LastModifiedTime', 'Specter Property Type'{Specter Property Type}:'SpecterPropertyType', 'Picture URL'{Picture URL}:'PublishingImage;PictureURL;PictureThumbnailURL', 'Link URL'{Link URL}:'Path', 'Line 1'{Line 1}:'Title', 'Line 2'{Line 2}:'Description', 'SecondaryFileExtension', 'ContentTypeId'</mso:ManagedPropertyMapping>

Obtain Managed Properties

Page 27: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonA Look at the Code: Item Template

@EricOverfield - pixelmill.com

Load Managed Properties into

JavaScript Variables

var specterPropertyType = $getItemValue(ctx, "SpecterPropertyType");

var lastModifiedTime = $getItemValue(ctx, "LastModifiedTime");

Page 28: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonA Look at the Code: Item Template

@EricOverfield - pixelmill.com

Display JavaScript Variables with

HTML Markup<span class="_#= specterPropertyType=#_"> <a href="_#= linkURL =#_" class="thumb"> _#= pictureMarkup =#_ <div class="date"> <div class="d">_#= date=#_</div> <div class="m">_#= month=#_</div> </div> </a> <div class="caption">Property Type: _#=

specterPropertyType=#_</div></span>

Page 29: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

Display Components and Their

MappingsComponent Type File SharePoint Artifacts

Style for the entire result set block and for each search result item

CSS style.cssCSS file in the Master Page Gallery:

/Spectergroup/css/style.css

Structure for the entire block of results

HTML tag: <ul>

Control_List_Specter

Custom Control display template in the Master Page Gallery:

/Display Templates/Content Web Part/Control_List_Specter.html

Display content for each result item

HTML tag: <li>

Item_LargePicture_Specter

Custom Item display template in the Master Page Gallery:

/Display Templates/Content Web Part/Item_LargePicture_Specter.html

Pre-process data for each result item

JavaScriptInline JavaScript in Item_LargePicture_Specter

Custom Item display template in the Master Page Gallery:

/Display Templates/Content Web Part/Item_LargePicture_Specter.html

Page 30: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonDisplay Templates Review

@EricOverfield - pixelmill.com

Add managed properties to top of display template

Customize with HTML, JavaScript and CSS

Copy an existing display template

Page 31: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

That is SharePoint 2013

Content Rollup

in a Nutshell@EricOverfield - pixelmill.com

OK?

Page 32: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Fine Tune Search Results

and Content Rollups

@EricOverfield - pixelmill.com

Page 33: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Target IndividualResult Items!

@EricOverfield - pixelmill.com

Page 34: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonQuick Test

@EricOverfield - pixelmill.com

Wait, what, a Test?

Find the PDF

Find Joanna’s Project

Page 35: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven
Page 36: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

The Problem

Results all look the same

But all documents/results are not the

same

@EricOverfield - pixelmill.com

Forces us to search our results

Page 37: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Demo Solution: What We Want to Build…

Scenario:

Customize Search

Experience

When user searches for “floor

plans”

Customize floor plans result

type as best bets

Promote beachfront

properties in the summer

Page 38: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Result Types

Tailor the look of important types of

results

@EricOverfield - pixelmill.com

One of these things… is not like the other.

Page 39: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Result Types

Conditions match result properties

Identify a “type” of result

Display Templates can change the look

Of a “type” of result

@EricOverfield - pixelmill.com

Page 40: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Your Own Result Type

@EricOverfield - pixelmill.com

1

2

Page 41: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

And Thus Styled

Page 42: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Query Rules

Custom results based on intent

May be created at various levels

Search Service App or Site Collection and

inherited

@EricOverfield - pixelmill.com

May be deactivate at child levels

Page 43: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Create a Query Rule

Condition: Set of conditions to match to fire

rule

Action: What to do when rule fired

@EricOverfield - pixelmill.com

Publishing: When should a rule be active

One or more conditions per rule

Six types of conditions available

One or more actions per rule

Six types of actions available

i.e. only during a certain time span

Page 44: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Your Own Query Rule

Add a Summer Promotion for Beachfront

Properties

@EricOverfield - pixelmill.com

Page 45: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

Page 46: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

Page 47: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

@EricOverfield - pixelmill.com

And Thus Promoted

Page 48: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Push NotificationsLet’s See a ComparisonResult Types and Query Rules Review

@EricOverfield - pixelmill.com

Result Types Match Conditions to Item Display TemplatesQuery Rules Match Conditions with Actions

Page 49: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

What You Did Learn

Aggregate Content Across Sitescross-site publishing feature

Create Content Rollup Solutionscustom display templates

Customize Individual Search Results

result types

Fine-tune Search Queriesquery rules

@EricOverfield - pixelmill.com

Page 50: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Resources

Configure cross-site publishing in SharePoint 2013:http://technet.microsoft.com/en-us/library/jj656774.aspx

Understanding the display template structure:

http://msdn.microsoft.com/en-us/library/jj945138.aspx#bk_DTstructure

Display template reference in SharePoint Server 2013:

http://technet.microsoft.com/en-us/library/jj944947.aspx

Administer search in SharePoint Server 2013:

http://technet.microsoft.com/en-us/library/ee792877.aspx

Connect a publishing site to a catalog:

http://technet.microsoft.com/en-us/library/jj679901.aspx

Make a query rule inactive:

http://technet.microsoft.com/en-us/library/

jj871014.aspx#BKMK_MakeInactiveCustomize search result types:

http://technet.microsoft.com/en-us/library/dn135239.aspx

Create query rules:

http://technet.microsoft.com/en-us/library/jj871014.aspx

@EricOverfield - pixelmill.com

Page 51: Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Content in SharePoint 2013

Integrating Search Driven

Thank YouEric Overfield

@EricOverfieldericoverfield.com

[email protected]