SharePoint 2013 Content search web part - Get it all in one place and style it!
-
Upload
benjamin-niaulin -
Category
Technology
-
view
18.810 -
download
3
description
Transcript of SharePoint 2013 Content search web part - Get it all in one place and style it!
Benjamin NiaulinPresented at: SharePoint Saturday St-Louis
SharePoint Geek
Content Search Web Part – Get it all in one place and style it!
Share-gate.com@bniaulin
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!
Share-gate.com@bniaulin
Who is this guy talking?
Benjamin NiaulinSpeaker, Trainer, Consultant, SCRUM MasterBlog
bniaulin.wordpress.comWebsite
share-gate.comEmail
[email protected]!: @bniaulin
4 | SharePoint Saturday St. Louis 2013
Session Evaluations Schedule and evaluate each session you attend via our
mobile app that can be used across devices at http://spsaturday. azurewebsites.net
You will be able to evaluate sessions added to your “My Sessions” 25 minutes before the scheduled end time
Evaluations are stored anonymously and your feedback is appreciated
The app will be the only method available to submit session evaluations for the event and we hope you find it intuitive and convenient
5 | SharePoint Saturday St. Louis 2013
Housekeeping Follow SharePoint Saturday St. Louis on
Twitter @spsstlouis and hashtag #spsstl Play “Sponsor Bingo” to register for your
chance to win one of the many great giveaways at the end of the day
Schedule and evaluate each session you attend via our mobile app that can be used across devices at http://spsaturday. azurewebsites.net
6 | SharePoint Saturday St. Louis 2013
Thanks to Our Sponsors!
Gold Silver Raffle
Share-gate.com@bniaulin
Agenda
Introduction – Problems and Previous SolutionsBasics of Search 2013Content Search Web Part – Intro
Introduction DemoOverview of the Query BuilderDisplay TemplatesExisting Content Search in SP2013
LicensingOther solutions?Cool Ideas – What this means for 2013
INTRODUCTION
Share-gate.com@bniaulin
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
Share-gate.com@bniaulin
Previous Solutions
Content Query Web Part
Search Coding
Share-gate.com@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) > 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>
BASICS OF SEARCH 2013
Share-gate.com@bniaulin
What’s new?
FAST + SEARCHContinuous CrawlContent SearchDisplay Templates everywhere
HTML – no more XSLTSearch ResultsResult Sources, Result Types…. Just an overall better Search
=Search Driven Sites
CONTENT SEARCH
Share-gate.com@bniaulin
Introduction to the Web Part
SearchSearch Crawl
Content Search Web Part
Site Collection A
Site Collection B
Share-gate.com@bniaulin
What is it made of?
The Content Search Web Part is essentially 2 things
1. Query Builder
2. Display Templates
QUERY BUILDER DEMO
DISPLAY TEMPLATES
Share-gate.com@bniaulin
Overview
http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=1041
Share-gate.com@bniaulin
What it does
Stored in “~sitecollection/_catalogs/masterpage/Display Templates/”Provides reusable displays for your ContentNO MORE XSLT! HTML and JavascriptUses “Managed Properties” to show the content in right <div>
Share-gate.com@bniaulin
Categories of Display Templates
ControlSimilar to ContentQueryMain.xsl
Filter, Group and Hover PanelSimilar to Header.xsl +more
ItemSimilar to itemstyle.xsl
Share-gate.com@bniaulin
Control
The container for the “Groups, Filters and Items” to comeBest way to reference custom files (JavaScript, CSS, etc…)
Share-gate.com@bniaulin
Item
Controls what happens to each item rendered through the queryUse Managed Properties to show the content you want where you want using HTML
Share-gate.com@bniaulin
Editing a Display Template
Always comes in 2; a HTML and JS fileNEVER edit the JS file – it is automatically generated
Share-gate.com@bniaulin
Editing a Display Template (2)
Very easy to understand and manipulate compared to XSLT
Always best to copy an existing and work from thereRemember to only copy the HTML file, the JS is generatedDemo!
PREBUILT
Share-gate.com@bniaulin
Prebuilt Content Searches
Microsoft SharePoint offers prebuilt Content Search Web Parts for specific scenarios
LICENSING
Share-gate.com@bniaulin
Not available everywhere
Only available on SharePoint 2013 Enterprise
OTHER SOLUTIONS?
Share-gate.com@bniaulin
Search Results Web Part
How-To
WHAT THIS MEANS
Share-gate.com@bniaulin
Cool!
Create dynamic Home Pages or Collaboration SitesRender an entire Web Page through Content Search
Web Page is a Search Result contextual to the user!Cool!
DEMO
Share-gate.com@bniaulin
THANK YOU!
KEEP IN TOUCH ON TWITTER @BNIAULINBlog
bniaulin.wordpress.comWebsite
share-gate.comEmail
Benjamin Niaulin