site collection a content query web part site collection b site collection c site collection
TRANSCRIPT
![Page 1: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/1.jpg)
![Page 2: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/4.jpg)
What we want to build…
![Page 5: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/5.jpg)
Content Search
![Page 6: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/6.jpg)
Scenario: Show dynamic content
![Page 7: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/10.jpg)
Get the results
![Page 11: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/12.jpg)
<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="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">&nbsp;</xsl:text> <xsl:value-of select="$SrchRSSText"/> </a> <xsl:if test="string-length($SearchProviderLink) > 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">&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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/13.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/14.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/15.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/16.jpg)
Content Search in actionDemo
![Page 17: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/17.jpg)
• 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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/18.jpg)
• 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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/19.jpg)
Custom display templatesDemo
![Page 20: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/20.jpg)
• 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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/21.jpg)
Search Center
![Page 22: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/22.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/23.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/24.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/25.jpg)
• 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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/26.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/27.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/28.jpg)
Result Types “Out of the box”Demo
![Page 29: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/29.jpg)
Great!But how do I build one?
![Page 30: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/30.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/31.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/32.jpg)
Custom Result Type for Marketing CampaignsDemo
![Page 33: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/33.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/34.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/35.jpg)
Debugging display templatesDemo
![Page 36: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/36.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/37.jpg)
Whew, and we’re done
![Page 38: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/38.jpg)
Look what we built in an hour!
![Page 39: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/39.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/40.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/41.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/42.jpg)
Please complete an evaluation form
![Page 43: Site Collection A Content Query Web Part Site Collection B Site Collection C Site Collection](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/43.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062515/56649d205503460f949f4bff/html5/thumbnails/44.jpg)
© 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.