site collection a content query web part site collection b site collection c site collection

44

Upload: byron-gregory

Post on 18-Dec-2015

226 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection
Page 2: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Customizing Search Experiences in SP2013Kerem YuceturkProgram Manager

SPC063

Page 3: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

You will…

Learn how to customize experiences in Search Centers and portals that use Content Search

Understand Display Templates and Result Types

Page 4: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

What we want to build…

Page 5: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Content Search

Page 6: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Scenario: Show dynamic content

Page 7: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Site Collection A

Content Query Web Part

Site Collection B

Site Collection C

Site Collection

List of articles/documents

Page 8: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Site Collection A

SearchSearch Crawl

Content Search Web

Part

Site Collection B

Site Collection C

Site Collection D

List of articles/documentsRecommendationsPopular items

Page 9: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Content Search 30,000 ft. view

Get the results: Query Builder

Show the results: Display Templates

Page 10: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Get the results

Page 11: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Query Builder: Connecting you to results

Create queries Preview Results

Full screen query builder to create/test queries

Fully integrated with result sources and query rules

Query variables are substituted at query time

Page 12: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

    <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"/>                </a>                <xsl:if test="string-length($SearchProviderLink) &gt; 0">                    |                    <a href ="{$SearchProviderLink}" title="{$SearchProviderText}" class="srch-ext-action-margin" >                        <img style="vertical-align: middle;" border="0" src="/_layouts/images/searchfolder.png" alt=""/>                        <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>                        <xsl:value-of select="$SearchProviderText"/>                    </a>                </xsl:if>            </xsl:if>        </div> 

Page 13: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Hello, Display TemplatesCraft the perfect look in HTML &

JavaScript

Page 14: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

What a display template does

Displays them using HTML and JavaScript instead of XSL

File Extension Title Preview Image

Document SummaryPath

Retrieves managed properties

Page 15: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Layers for display templatesControl Item

Also:Filter, Group and Hover Panel

Page 16: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Content Search in actionDemo

Page 17: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

• Rolled up documents from another site collection

• Changed how they look using OOB display templates

• Put up a slideshow for pictures on the site• Showed personalized results

Demo Summary: Content Search in action

Page 18: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

• Place them in the Master Page Gallery• Copy one of the existing ones for best

results• Use the editor of your choice

Your own display templates

Page 19: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Custom display templatesDemo

Page 20: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

• Copied an existing display template• Added a new managed property• Customized the information based on a

JavaScript condition

Demo Summary: Custom display templates

Page 21: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Search Center

Page 22: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Search Web Parts are all new in SP2013

Meet the family

Page 23: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Quick test… raise your hand when you’re done

you ready?

Page 24: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Find the PDF

Now find Joanna’s project

Page 25: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

• Results all look the same• Company documents and sites are not the same

What’s the problem?

Page 26: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Hello, Result TypesTailor the look of important types of

results.

Page 27: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Result Types

Conditions match result properties to identify a “type” of result.

A Display Template changes the look of that type of result.

Page 28: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Result Types “Out of the box”Demo

Page 29: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Great!But how do I build one?

Page 30: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

1. Plumb any properties you need into search

2. Create the look you want with a Display Template

3. Hook up the template to a Result Type4. Try it out with a search!

Building a Result Type

Page 31: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

ScenarioYour marketing department has “Marketing Campaigns”.

ProblemFinding the right document is difficult and time consuming.

SolutionMake documents stand out, and show additional fields.

Let’s give it a shot

Page 32: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Custom Result Type for Marketing CampaignsDemo

Page 33: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

1. Created a list with custom site columns2. New display template, add our code3. New result type, add condition, use

template

See the magic.

Summary: Building a custom result type

Page 34: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

What if something goes wrong?

…debugging display templates

Page 35: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Debugging display templatesDemo

Page 36: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Take hints from the error messages in the UI.

For runtime errors, use browser debugging or Visual Studio with breakpoints and watches.

Use the “ctx.CurrentItem” object to see what’s returned from search.

Summary: Debugging

Page 37: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Whew, and we’re done

Page 38: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Look what we built in an hour!

Page 39: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

You…Learned how to customize experiences in Search Centers and portals that use Content Search

Now understand Display Templates and Result Types

Page 40: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

HOLs and events @ SPCHOL031 – Introduction to Search in SharePoint 2013HOL034 – Exploring Search Query Rules in SharePoint 2013HOL032 – Extending the Search experience in SharePoint 2013HOL033 – People Search in SharePoint 2013HOL035 – SharePoint Server 2013 Search Connectors and Using BCSHOL039 – Designing a SharePoint 2013 siteHOL041 – Hands on with Content Search web part in SharePoint 2013

Meet a Search SME

Ask questions, meet the community and share knowledge!

Mon-Thu @ Exhibit Hall

Hands on Labs

Daily 10:30am-6:30pm @ HOL Lab Lounge

Ask the Experts

Discuss search!

Wed 6:15PM @ Ask the Experts Lounge

Page 41: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Related Sessions @ SPCMon 2:00pm - SPC259 - What's New in Search for SharePoint 2013Speakers: Glen Anderson, Cem Aykan

Tue 3:15pm - SPC230 - Step by Step: Building Search Driven Applications with SharePoint 2013 - Speaker: Scot Hillier

Wed 9:00am - SPC143 - Making Great Search Based Applications with Query Rules in SharePoint 2013 - Speaker: Pedro DeRose

Wed 1:45 PM – SPC246 - Using jQuery and Display Templates to create modern Web Sites - Speaker: Ethan Gur-esh, Jeremy Kelley

Tue 10:30 AM – SPC019 - Best Practices for Designing Websites with SharePoint 2013 - Speaker: Ethan Gur-esh, Alyssa Levitz

Page 42: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Please complete an evaluation form

Page 43: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

Evaluate this session now on MySPC using your laptop or mobile device: http://myspc.sharepointconference.com

MySPC

Page 44: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.