Presentation is loading. Please wait.

Presentation is loading. Please wait.

Making the Most of Search in SharePoint 2013 Christina Wheeler.

Similar presentations


Presentation on theme: "Making the Most of Search in SharePoint 2013 Christina Wheeler."— Presentation transcript:

1 Making the Most of Search in SharePoint 2013 Christina Wheeler

2 About Me Christina Wheeler, MCTS SharePoint Trainer & Consultant Critical Path Training http://www.criticalpathtraining.com – Blog: http://www.cwheeler76.comhttp://www.cwheeler76.com – Twitter: @cwheeler76 – Published Books SharePoint 2010 Field Guide SharePoint 2013 Inside Out

3 Result Types New framework for presenting search results Elements that enable each result type to be rendered differently

4 Result Type Rules Create variety set of rules on which to match: – Equality(= or !=), comparison ( ), or logical (AND or OR or NOT) – You can have multiple rules as a condition – You can use managed properties in a rule

5 Result Type Rules

6 Result Types Management Result types are managed by: – Apply to entire search service application or to a specific site or web – OOB Result Types cannot be changed but can be overridden with a copy – Hierarchy inheritance to result types in a site Current web + site collection root + Search Service Application

7 Search Refinement Refiner Web Part – Two different modes: Search results: refinement data works essentially same as SharePoint 2010 Faceted navigation: uses term from term store to filter what kind of data should be displayed In SharePoint 2013, you can define display templates to use for rendering different kinds of refinements – In SharePoint 2010, you had write managed code custom refiners

8 Display Templates Snippets of HTML and JavaScript – Defines visual layout of Result Type OOTB Display Templates Included: Master Pages/Display Templates/Search Edit with ANY HTML editor tool (Dreamweaver, SharePoint Designer, Visual Studio, Notepad)

9 Display Templates Only Search Web Parts use Display Templates Configured for site and site collections Applied: – With rules and logic – To individual result items (not entire result set) Can add placeholders to HTML file where managed properties should be emitted

10 Display Templates Structure Fully-formed HTML document but does not represent a full HTML page – SharePoint converts pieces of the display template HTML file into JavaScript Title tag – Text in tag is used as display name in Display Templates section of Web Part edit pane Example for item display template named Item_Picture3Lines.html:

11 Display Templates Structure Header properties – Immediately after tag – Set of custom elements bounded by the following markup:

12 PropertyDescription TemplateHidden Boolean value. Hide/show display template from list of available templates in Web Part. ManagedPropertyMapping Maps fields exposed by search result items into properties available for JavaScript. Used only in item templates. MasterPageDescription Provides friendly description of display template shown in Edit Mode. ContentTypeId ID of content type associated with display template. TargetControlType Indicates context in which the display template is used. HtmlDesignAssociated Boolean value that indicates whether a display template HTML file has a.js file associated with it. HtmlDesignConversionSucceeded Indicates conversion process success. Value automatically added to file by SharePoint. HtmlDesignStatusAndPreview Contains URL to HTML file and text for Status column (either Conversion successful or Warnings and Errors). Automatically added to file by SharePoint.

13 Display Templates Structure Script block – Inside tag, you can see the following tag: By default, line is included in all display templates – You can add more lines of code inside tag to reference CSS files or other JavaScript files

14 If you want to include the following: Use the following code: JavaScript file part of current site collection $includeScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/MyScripts.js"); External JavaScript file $includeScript(this.url, "http://www.contoso.com/ExternalScript.js"); CSS file part of current site collection $includeCSS(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/MyCSS.css"); CSS file in location relative to current display template $includeCSS(this.url,"../../MyStyles/MyCSS.css");

15 Display Templates Structure DIV block – Following tag is tag with an ID By default, ID for tag matches name of HTML file – Any HTML or code you want display template to provide must be included inside tag

16 Mapping Properties ManagedPropertyMapping – Custom document property in header section of item display template Property takes managed properties used by search Maps to values that can be used by display template – Comma-delimited list of values: – 'Picture URL'{Picture URL}:'PublishingImage;PictureURL;PictureThumbn ailURL'.

17

18

19

20 Result Type w/Display Template Example for.txt files

21 Questions? Critical Path Training http://www.criticalpathtraining.com http://www.criticalpathtraining.com – Blog: http://www.cwheeler76.comhttp://www.cwheeler76.com – Twitter: @cwheeler76 – Published Books SharePoint 2010 Field Guide SharePoint 2013 Inside Out


Download ppt "Making the Most of Search in SharePoint 2013 Christina Wheeler."

Similar presentations


Ads by Google