SharePoint “15” App Model – Introduction
MACROBUTTON AcceptAllChangesInDoc Microsoft SharePoint 2013 - Cross Site PublishingVerified Against Build #15.0.4128.1014Prepared bySriram BalaSharePoint PracticeTable of Contents TOC \o "1-3" \h \z \u Cross Site Publishing PAGEREF _Toc384919444 \h 3Introduction to Cross Site Publishing PAGEREF _Toc384919445 \h 3Stage 1: Create site collections for cross-site publishing PAGEREF _Toc384919446 \h 4Stage 2: Import list content into the Product Catalog Site Collection PAGEREF _Toc384919447 \h 7Stage 3: How to enable a list as a catalog PAGEREF _Toc384919448 \h 11Stage 4: Set up search and enable the crawling of your catalog content PAGEREF _Toc384919449 \h 18From site column to managed property - What's up with that? PAGEREF _Toc384919450 \h 25Stage 5: Connect your publishing site to a catalog PAGEREF _Toc384919451 \h 30Stage 6: Upload and apply a new master page to a publishing site PAGEREF _Toc384919452 \h 44Stage 7: Upload page layouts and create new pages in a publishing site PAGEREF _Toc384919453 \h 57Stage 8: Assign a category page and a catalog item page to a term PAGEREF _Toc384919454 \h 65Stage 9: Configure the query in a Content Search Web Part on a category page PAGEREF _Toc384919455 \h 75Stage 10: Configure the query in a Content Search Web Part on a catalog item page PAGEREF _Toc384919456 \h 86Stage 11: Upload and apply display templates to the Content Search Web Part PAGEREF _Toc384919457 \h 95Stage 12: Plan to use refiners for faceted navigation - Part I PAGEREF _Toc384919458 \h 107Stage 13: Plan to use refiners for faceted navigation - Part II PAGEREF _Toc384919459 \h 113Stage 14: Configure refiners for faceted navigation PAGEREF _Toc384919460 \h 120Stage 15: Add refiners for faceted navigation to a publishing site PAGEREF _Toc384919461 \h 139Stage 16: Add a Taxonomy Refinement Panel Web Part to a publishing site PAGEREF _Toc384919462 \h 150Cross Site PublishingIntroduction to Cross Site PublishingWhat is cross-site publishing?Cross-site publishing's a publishing method. It lets you create and maintain content in one or moreauthoring site collections, and publish this content across one or more?publishing site collections, by using?Search Web Parts.?When should you use cross-site publishing?Use cross-site publishing when you want to store and maintain content in one or more authoring site collections and display this content in one or more publishing site collections. Cross-site publishing will make life easy for you as it:Can be used across site collections, web applications, and even across farms.Separates content authoring from branding and rendering, meaning how you author content has nothing to do with how it is displayed to users.Allows you to mix pages and catalog content.?How does cross-site publishing work??Cross-site publishing uses search technology to retrieve content. Here's how it works in four simple steps:You create content in libraries and lists in a site collection where cross-site publishing is enabled. You enable these libraries and lists as catalogs.You crawl the content in your catalog-enabled libraries and lists. This will add the catalog content to the search index.You add one or more Search Web Parts to the site collections where you want to display your catalog content.When users view a page, the Search Web Parts issue queries to the search index. Query results are returned from the search index, and shown in the Search Web Parts.?When you decide to change content in an authoring site collection, the changes you make are shown across all publishing site collections that are using that same content.You can also add search-driven features like faceted navigation, query rules and usage analytics, all of which we'll be talking about soon.Stage 1: Create site collections for cross-site publishingStart stage 1When you use cross-site publishing, you use one or more authoring site collections to author and store content, and one or more publishing site collections to show this content.In our scenario, we'll start by creating a?Product Catalog Site Collection. We'll use this site collection to author and store information about the products that Contoso offer, for example, info about the MP3 player "Litware 2G E200", or the Laptop "Adventure Works 15.4W".Along with this, we'll be creating a?Publishing Portal Site Collection. We'll use this site collection to display product info about "Litware 2G E200", "Adventure Works 15.4W" and all the other products that Contoso offer.Remember though, visitors browsing the Contoso website, which is the publishing portal, will NOT be able to view content in the product catalog! Visitors will only get to see content that has been added to the search index from the product catalog. When visitors browse the Contoso website, search technology displays content from the search index.So, in the simplest of terms, our architecture will look like this:??Bear with me if this is a bit tricky to follow. I'll soon be using real examples, and it'll all become a lot clearer. But first things first: let's create the site collections.To create a Product Catalog Site Collection, here what you should do: Go to?Central Administration?-->?Create site collections, and then enter details for the site collection. Here's what you need to enter:A?title?for the website.The website's?URL.Select?2013?for the experience version.From the?Publishing?tab, select the?Product Catalog?template.In the field Primary Site Collection Site Administrator, enter the site admin's?user name.Take a look at the screen capture below for some more guidance.?Now, to create a Publishing Portal Site Collection, repeat the steps above, but with one difference, from the?Publishing?tab, choose?Publishing Portal. The title of this site collection is?Contoso.?Now that we've our site collections, it's time to start adding content.Stage 2: Import list content into the Product Catalog Site CollectionStart stage 2Once you've set up your Product Catalog Site Collection, as described in?Stage 1: Create site collections for cross-site publishing, we'll import content into this site collection. To do this, we'll use PowerShell scripts. Before we start, let's take a look at what's automatically created in a Product Catalog Site Collection.In our newly created?Product Catalog Site Collection, you can see a default list template namedProducts.?The?Products?list contains a managed metadata site column named?Item Category.The?Item Category?site column is associated with the term set named?Product Hierarchy.To import list content into the?Product?list, we'll use PowerShell scripts that will:Add content to the?Products?list.Add terms to the?Product Hierarchy?term set.Associate each item in the?Products?list with the correct term from the?Product Hierarchy?term set, and display this in the?Item Category?column in the?Products?list.?Before we can run the PowerShell scripts, we'll need to prepare the following:A list of the site columns we want to add to the?Products?list.A tab delimited text file containing the content you want to add to the?Products?list.A tab delimited text file containing the taxonomy to be added to the?Product Hierarchy?term set.?The PowerShell scripts, instructions on how to create the tab delimited text files, and how to modify and use the import scripts so that it fits your catalog data can be found on the?TechNet Gallery.?Once we've run the five PowerShell scripts, we get the following:List content in the?Products?list. In our scenario, each list item is a product that Contoso is offering and want to display on their website.Terms in the?Product Hierarchy?term set. In our scenario, the term set reflects how Contoso have categorized their products, for example one category is called "Laptops", another one's "MP3" players, etc.In the?Products?list, content in the?Item Category?column is associated with the correct term from the?Product Hierarchy?term set. The screenshot below shows how the list item?Southridge Video Laptop15.4W M1548? is associated with the term?Laptops?through the?Item Category?column.?So,?now that we have content in the?Products?list, the next step is to enable this list as a catalog.Stage 3: How to enable a list as a catalogAs described in?Stage 2: Import list content into the Product Catalog Site Collection, we've imported content about Contoso's product line into the?Products?list. To display this product information in our Publishing Portal (the Contoso website), we now have to enable the?Products?list as a catalog.These are the steps we'll take to enable a list as a catalog:Go to catalog settings page.Enable catalog sharing.Enable anonymous access.Define website navigation hierarchy.Define values to use in the URL to an individual product.?Start stage 3?1. On the?Products?list, from the?LIST?tab, click?List Settings.On the?Settings?page, click?Catalog Settings.?We'll define several things on the?Catalog Settings?page. I'm going to break all of this down into individual chunks.???2. For?Catalog Sharing?Select?Enable this Library as a catalog.By selecting this, we'll be confirming that content from the?Products?list should be added to the search index.?3. For?Anonymous Access, click?Enable anonymous access, and then click?Make Anonymous.By doing this, we'll be granting anonymous visitors, that is, visitors who aren't logged on to Contoso's website, access to view content from this list.Note that we're?not?granting visitors access to the list itself; all we're doing is enabling the list content to be added to the search index, and granting anonymous visitors access to?view?this content. Anonymous visitors will never be able to see the actual?Products?list.4. For?Navigation Hierarchy?(this section shows up after?Catalog Item URL?in the UI, but I prefer to tell you about this one first), select?Item Category.In my previous blog post,?Stage 2: Import list content into the Product Catalog Site Collection, I showed you how the managed metadata column Item Category is tied to the Product Hierarchy term set.By selecting?Item Category?here, we're in fact specifying that the navigation on our publishing site (the Contoso website) will be determined by the structure in the?Product Hierarchy?term set.In the next screenshot, notice that the structure in the?Product Hierarchy?term set, matches the navigation on the Contoso website.?The terms from the?Product Hierarchy?term set will also be used to create a friendly URL for our category pages on the publishing site (the Contoso website). For example, the URL to the page displaying camcorders is?, and the URL to the page displaying camera accessories is?. For?Catalog Item URL Fields, select the list columns that should be used to create a unique URL to a product. For Contoso, we'll use?Group Number?and?Item Number.??The URL to an individual product will be composed of the terms that we specify in?Navigation Hierarchy?(previous step),?and?the values from the fields we specify as?Catalog Item URL Fields. When selecting these fields, we should use at least one field that contains a product unique value, because we want to use this unique value in the product URL. By doing this, the URL to the productFabricam Home Movimaker M300?will be different from the URL to the product?Fabricam Home Movimaker M400.For Contoso, the unique identifier of a product is the value in the?Item Number?column. We also want to use the value of the?Group Number?column, so we'll add them both (I'll explain why I also want to use Group Number in a later post).??Our final?Catalog Settings?page looks like this:??So now that we have set all these specifications, it's time to crawl the catalog.?Stage 4: Set up search and enable the crawling of your catalog contentAs described in?Stage 3: How to enable a list as a catalog, the?Products?list has now been enabled as a catalog. As we'll be using search technology to retrieve and display content on our publishing site (the Contoso website), we have to crawl the catalog so that its content is added to the search index.In this blog post, we'll learn:About crawlingHow to start a full crawl in Central AdministrationHow to enable continuous crawls in Central AdministrationHow to set continuous crawl intervalHow to initiate a reindexing of the catalogHow to view crawl status and schedule for a catalog?About crawlingDepending on your permission level, you can start a crawl from two places:Where to start crawlRequired premission levelCentral AdministrationSearch service application administratorOn the catalogSite collection administratorThe reason why you can start a crawl from two places is that people working with catalog content (let’s call them content managers) are?not?likely to have Search service application administration level rights, that is, they don’t have access to Central Administration.When changes are made to catalog content, it makes sense to want to crawl this content fairly quickly, so that it can be displayed on the publishing site.Luckily, content managers can make new content available without having to pester Search service application administrators to run new crawls -- but we'll be coming back to how to do this very shortly, as I first want to explain how to start a full crawl in Central Administration.?How to start a full crawl in Central AdministrationBefore you can start a full crawl in Central Administration, you have to specify which content source should be crawled. When you run a full crawl, all content in the content source is crawled even if that content has already been added to the search index.For this scenario, we'll crawl the?Local SharePoint?sites content source.Go to?Central Administration?-->?Manage service applications?-->?Search Service Application-- >?Content Sources.?On the?Manage Content Sources?page, hover over the?Local SharePoint sites?content source, and select?Start Full Crawl?from the menu.?The status of the crawl is shown in the?Status?column.Refresh this page until you see that the value in the?Status?column is?Idle.?This means that the crawl has finished.Optionally, you can verify that your items have been added to the search index by clicking?Crawl Log.In our scenario, we now have 870 items in the search index, which is approximately the same amount of products we have in the?Products?list.???How to enable continuous crawls in Central Administration?You can only start a full crawl manually. Nobody wants the hassle of having to manually start a crawl every time a change is made to their catalog content, as this is neither an efficient nor practical way to work. So, to avoid this overhead, you can simply enable a?continuous crawl?of your content source that contains the catalog.??Continuous crawls start automatically at set intervals. Any changes that have been made to the catalog since the previous crawl, are picked up by the crawler and added to the search index.To enable continuous crawls:Go to?Central Administration?-->?Manage service applications?-->?Search Service Application-->?Content Sources.On the?Manage Content Sources?page, click Your content source for which you want to enable continuous crawl, in our scenario case, this is?Local SharePoint?sites.Select the option?Enable Continuous Crawls.??How to set continuous crawl intervalThe default interval for continuous crawls is 15 minutes. You can set shorter intervals by using PowerShell. The code snippet below sets the continuous crawl interval to 1 minute.$ssa = Get-SPEnterpriseSearchServiceApplication$ssa.SetProperty("ContinuousCrawlInterval", 1)So, by enabling continuous crawls, you can avoid a lot of frustration from content managers as they no longer have to wait for Search service application administrators to start a crawl for them. However, for some catalog changes, for example, enabling managed properties as refiners, continuous crawls are not sufficient, and you will need to do a full reindexing of the catalog content. But not to worry. Content managers have no reason for concern, because there is a way for them to initiate a full reindexing of the catalog.??How to initiate a reindexing of the catalogTo mark a catalog for reindexing, here's what to do:?On your catalog (in our case the?Products?list in the Product Catalog Site Collection), click theLIST?tab -->?List Settings?-->?Advanced Settings.On the?Advanced Settings?page, click?Reindex List.???How to view crawl status and schedule for a catalogYou can view the crawl status and schedule for an individual catalog. To do this:On your catalog (in our case the?Products?list in the Product Catalog Site Collection), click theLIST?tab -->?List Settings?-->?Catalog Settings.On the?Catalog Settings?page, you can see when the catalog was last crawled, and what crawls are scheduled to run when.?In our case, we can see that the catalog was last crawled on 3/4/2013 at 5:30:17 AM, and that continuous crawls are scheduled to run every 15 minutes.?So, all in all, content managers can be happy because their content is added to the search index at short intervals, and Search service application administrators can be happy because they are no longer bothered by content managers constantly asking them to start a crawl.??From site column to managed property - What's up with that?In?Stage 4: Set up search and enable the crawling of your catalog content, I showed you how to set up search and enable crawling of your catalog content. In this blog post, I'll explain what happens to site columns during crawl.When a catalog is crawled, the catalog content is added to the?search index, where the site columns are represented as?crawled?and?managed properties. Now, I just threw a lot of new words at you, so, let me explain more about the search index and crawled and managed properties.?In this blog post, we'll learn:About the search indexAbout crawled and managed propertiesAbout the naming convention for automatically created crawled and managed properties??About the search index?Let's start by going back to our overview diagram.?When a content source is crawled, its contents and metadata are added to the search index. In our scenario, that means that the content from the?Products?catalog is added to the search index. ??To display content on the publishing portal (the Contoso website), Search Web Parts are used. Search Web Parts contain a query, for example, "show all MP3 players that have the color red" (note: the query is not formulated in such common language, but for now, let's just keep it simple).? So when users navigate to a page that contains a Search Web Part, the query for?red MP3 players?is automatically sent to the search index. The query result is returned from the search index, and all red MP3 players are shown in the Search Web Part on the page.?What is important to understand, is that the content that we add to the search index, determines which search results can be returned when queries are issued from Search Web Parts. Simply put; if the content from our?Products?catalog isn't added to the search index, we can't display any catalog content on the Contoso website.??About crawled and managed propertiesDuring a crawl, the contents and metadata of the items are represented as?crawled properties. In our scenario, items are the site columns and the values that are stored in the?Products?catalog. The reason you need to know about crawled properties, is because we'll later use crawled properties when configuring refiners.Even though crawled properties contain values, they are "useless" without a partner. This partner is amanaged property. By creating a mapping between a crawled property and a managed property,?we'll be able to display content on Our Contoso website.The reason you need to know about managed properties, is because we'll later use managed properties when configuring queries in Search Web Parts, and when defining how search results should be displayed on a web page.I'll explain both the use of crawled and managed properties in more detail along with examples in later blog articles. For now, it's important that you understand that we'll use crawled and managed properties, and NOT the site columns from the?Products?catalog when querying for and displaying content on Our Contoso website.About automatically created crawled and managed properties?SharePoint comes with a number of default managed properties that are mapped to default crawled properties, for example, “Title”.In previous versions of SharePoint, whenever a new item was discovered during a crawl, users would have to manually?create a new managed property, and map this to the corresponding crawled property.In SharePoint Server 2013, you can use?automatically created crawled and managed properties. They make the lives of catalog owners a lot easier.When new content is added to a catalog (what we did in?Stage 2: Import list content into the Product Catalog Site Collection), a lot of new items will be discovered during a crawl (what we did in?Stage 4: Set up search and enable the crawling of your catalog content). To?avoid having to create a new managed property, and map this to the corresponding crawled property, SharePoint Server 2013?does this for you.?When a catalog's crawled, SharePoint Server 2013?automatically?creates a crawled property for each site column in the catalog. SharePoint Server 2013 also?automatically?creates a managed property for the site column, and adds a mapping between the two.Important note:?Only?site columns?that contain values automatically become managed properties when they're crawled.? Regular columns do not!So, that is a sweet deal!However, remember how I mentioned that you will use crawled- and managed properties in later stages when configuring refiners and queries in Search Web Parts? Well, in order to do that, it's important that you understand how the names of these automatically created crawled and managed properties are constructed.??About the naming convention for automatically created crawled and managed propertiesThe name of an automatically created property is a combination of the site column name, and the site column type.? This naming convention is a tricky area to understand, so I'll start with a simple example, with two site columns, and then I'll explain the rules that apply to all site column types.Naming convention for two site column types?In the Products list, we have:A site column named "Contoso Color" of type "Single line of text"A site column named "Contoso Weight" of type "Number"?During a crawl, a crawled property is automatically created for the site column. The name of this property is generated by removing spaces from the site column name, and adding a prefix. The prefix that is added varies depending on the site column type.So, in this example, we get the following crawled properties:ows_q_TEXT_ContosoColorows_q_NMBR_ContosoWeight?A managed property is then automatically created, which is mapped to the corresponding crawled property. The name of this property is generated by removing spaces from the site column name, and adding a suffix. The suffix that is added varies depending on the site column type.?So, in this example, we get the following managed properties:ContosoColorOWSTEXTContosoWeightOWSNMBRThat was simple, right? However, the naming convention?does?vary depending on the site column type.?Naming convention for all site column typesFor the creation of an automatically created?crawled property?name, the following apply:Spaces are removed from the site column name.For site columns of type?Publishing HTML?and?Multiple line of text, the following prefix is added to the site column? name:?ows_r_<four letter code>_For site columns of type?Managed Metadata, the following prefix is added to the site column? name:?ows_taxId_For all other site column types, the following prefix is added to the site column name:ows_q_<four letter code>_?For the creation of an automatically?managed property?name, the following apply:Spaces are removed from the site column nameFor site columns of type?Managed Metadata, the following prefix is added to the site column name:?ows_taxIdFor all other site column types, the following suffix is added to the site column name:?OWS <four letter code>?If you need more info, there's an overview table with examples for all site column types in the TechNet article?Automatically created managed properties in SharePoint 2013.So, that might not have been as straightforward as our simple example, and there is one exception to the rule…Naming convention for the default site columns in the Products listThis exception applies to the six site columns that by default are associated with the?Products?list in the Product Catalog Site Collection, as shown in the table right below:Site column nameCrawled property nameManaged property nameTitleTitleTitleItem Numberows_q_TEXT_ProductCatalogItemNumberProductCatalogItemNumberOWSTEXTGroup Numberows_q_TEXT_ProductCatalogGroupNumber?ProductCatalogGroupNumberOWSTEXTLanguage Tagows_q_CHCS_ProductCatalogLanguageTag?ProductCatalogLanguageTagOWSCHCSItem Categoryows_taxId_ProductCatalogItemCategory?owstaxIdProductCatalogItemCategoryRollup Imageows_r_IMGE_PublishingRollupImagePublishingImageNow, after all that theory, let's move on and get something concrete done! The real fun will start when I show you how to connect a publishing site to a catalog.? Stay tuned :-)Stage 5: Connect your publishing site to a catalogAs described in previous steps, we?created a Publishing Portal Site Collection called Contoso, and alsoenabled the Products list as a catalog.??We’re now going to connect the publishing site to our catalog. In this blog post, I'll describe how to:?Getting?to the Catalog Source Settings pageSpecifying the settings on the Catalog Source Settings pageWhat happens when I click the OK button to connect to a catalogThroughout this stage, we won’t have much clicking to do because a lot of the settings have already been preconfigured with what we specified in?Stage 3, How to enable a list as a catalog. However, I’ll be introducing a lot of new concepts throughout this post. Exciting, eh? I’ll be explaining these features as we go along, so, if you haven’t already gotten a cup of your favorite beverage, grab one now!To help you along, for this blog post, I'll be using these icons.This icon?means that I’ll be explaining the concepts of a setting.This icon??means that we’ll be doing activities (clicking) in order to connect to a catalog.??Start stage 5?Getting?to the Catalog Source Settings?pageAbout the Catalog?Source Settings page?The?Catalog Source Settings?page is an important page, because this is where you specify how your publishing site should be connected to your catalog. If you have several catalogs on your farm, each catalog will have its own?Catalog Source Settings?page.In our scenario, we only have one catalog, the?Products?catalog, so we want to go to the?Catalog Source Settings?page for the Products catalog.?Remember, in Stage3, we learned how to enable a list as a catalog, and we set a check box calledEnable this library as a catalog?? Well, in this step, SharePoint will search for libraries or lists where this check box has been selected.??How to get to the Catalog Source Settings page?On the Contoso site, go to?Site settings --> Manage catalog connections.On the Manage catalog connections page, click?Connect to a catalog.Our?Products?list displays as an available catalog. To connect to it, simply click?Connect.?Tip: If you click?Connect to a catalog?and there aren’t any available catalogs, this could be because you haven’t yet?crawled the catalog.Now that we have successfully navigated to the?Catalog Source Settings?page for our?Productscatalog, it's time to specify how the catalog should be integrated into our Contoso site.??Specify the settings on the Catalog Source Settings pageThis table gives an overview of the settings that we have to specify on the?Catalog Source Settingspage. If you want to go straight to a subsection, use the "Go to" links.ToGo toGo toSpecify Catalog IntegrationAbout specifying Catalog IntegrationHow to specify Catalog IntegrationSpecify the full site navigationAbout specifying the full site navigationHow to specify the full site navigationSpecify URL details for a product pageAbout specifying URL details for a product pageHow to specify URL details for a product pageSpecify a Category Page and an Item PageAbout specifying a Category Page and an Item PageHow to specify a Category Page and an Item Page??Specify Catalog IntegrationAbout specifying Catalog Integration??For this setting, you specify how the catalog content should be integrated in your publishing site. Your selection will impact if you have to specify further settings on the?Catalog Settings Page.?How to specify Catalog Integration?In the?Connection Integration?section, keep the setting?Integrate the catalog into my site?as it is -- selected.The reason why we're keeping this setting selected, is because we want to use the terms from theProduct Hierarchy?term set (from our Product Catalog Site Collection) in the navigation of our Contoso site.By keeping this setting selected, this will also enable us to define user friendly URLs, and have a category page and an item page automatically created for us (I'll describe what a category page and an item page is in more detail later).?Specify the full site navigationAbout specifying the full site navigation?A site that has been created by using the?Publishing Portal Site Collection?template (which is what we used?when we created this site), will by default have?Managed navigation?selected as its navigation method. Managed navigation is a new navigation method introduced in SharePoint Server 2013, which lets you define and maintain the navigation on your site by using term sets.?To view how the navigation of your site has been set up:Go to?Site settings?-->?Navigation.Verify that:?Managed Navigation?has been selected.The?Site Navigation?term set has been specified as the term set that defines the navigation on your site.??We are now going to build the full site navigation by integrating terms from the?Product Hierarchyterm set (from the Product Catalog Site Collection) into the?Site Navigation?term set.In our scenario, the navigation structure of our Contoso site will be quite simple, as it'll be made up of the terms from the?Product Hierarchy?term set only.?How to specify the full site navigation?To specify the full site navigation, we have to specify:Navigation HierarchyNavigation PositionNavigation Pinning?Navigation HierarchyYou'll notice that one of the settings,?Select the column that categorizes items for navigation, already contains information.? Do you remember how in Stage 3 we specified?Item Category?for theNavigation Hierarchy?setting, when we enabled a list as a catalog?? That setting is automatically carried over to this page, so we will keep the selected?Item Category?as is.And, do you remember in?Stage 2: Import list content into the Product Catalog Site Collection, that I showed you how the?Item Category?column is tied to the?Product Hierarchy?term set? I'm reminding you about this because we're now going to specify from where in the?Product Hierarchy?term set the catalog navigation should start. Here goes!In the?Root term of hierarchy?section, click the label icon.?A dialog box showing the?Product Hierarchy?term set opens.Select “Electronics”.?We're selecting this because we want all terms from the term set to be included in the catalog navigation.Don't select?Include root term in site navigation?as we don't want the root term “Electronics” to be shown in the site navigation.Our final?Navigation Hierarchy?settings will look like this:?Navigation PositionNavigation Position?defines where, in the current site navigation, the catalog navigation should be integrated. In other words, where, in the?Site Navigation?term set, the?Product Hierarchy?term set should be integrated. As the Contoso site will only contain catalog pages, I keep the setting??Add to navigation root?selected.Navigation PinningNavigation Pinning?determines whether or not changes that are made to the?Product Hierarchyterm set in the Product Catalog Site Collection should be reflected on your site navigation.If we decide to make changes to our?Product Hierarchy?term set, for example by changing the name of a term from “Printers, scanners and fax” to “Printers, scanners & fax”, we want this to be reflected on our site navigation. For this to happen, the?Pin terms to site navigation?check box should remain selected.??Specify URL details for a product page?About specifying URL details for a product pageWhen specifying URL details for a product page, you first have to decide which page you want your visitors to land on when they're browsing to a specific product.? To do this, you've two options:Visitors can land on a page within the publishing portalVisitors can land on the list item in the Product Catalog Site CollectionWe're building a customer-facing website for Contoso, with colorful, attractive pages to showcase our products. We similarly want our pages to have friendly URLs. Therefore, we'll choose the first option.If we were building an internal company website, where we wanted employees to view the actual list items in our catalog, we'd have chosen the second option.Important note:?When specifying URL settings for a product page, your security settings and site access settings remain the same. Visitors will only see what you've granted them permissions to see.?How to specify URL details for a product pageTo specify the URL details for a product page, you have to specify:Catalog Item URL BehaviorCatalog Item URL Format?Catalog Item URL BehaviorTo specify?Catalog Item URL Behavior, keep the?Make URLs relative to this site?setting selected.?By keeping this setting selected, when our Contoso visitors browse for a specific product, they'll be taken directly to a page in the publishing site collection.??Catalog Item URL FormatCatalog Item URL Format?defines how to build a friendly URL to the product page. We already specified this in Stage 3, How to enable a list as a catalog, when we?selected?Catalog Item URL Fields.In our Contoso scenario, we'll keep the setting?Use the default URL format provided by the catalog source?selected. This means that the URL to the product page will contain values from the managed properties?ProductCatalogGroupNumberOWSTEXT, and?ProductCatalogItemNumberOWSTEXT.?(If the manage property names are confusing, take a look at a previous blog where I show you?how automatically created properties are named)?Specify a Category Page and an Item PageAbout specifying a Category Page and an Item Page?When you display information in a catalog format, the layout and structure should be consistent across the catalog. For example, you want to display the image of a product in the top left corner, followed by a table of product specifications, such as the height and color of the product.? The same applies to category pages. For example, you want the page for all TVs to?have the same layout as the page for all cameras.To avoid having to create several pages for each product,?and several pages for each category, you can use one template page for each. In SharePoint, an?Item Page?and a?Category Page?serve this purpose.In our Contoso website scenario, we'll neither create an Item Page, nor shall we create a Category Page as SharePoint will do this for us automatically.How to specify a Category Page and an Item PageIn the section?Category Page, keep?Create a new page?selected.By doing this, SharePoint automatically creates a new category page.In the section?Item Page, keep?Create a new?page?selected.By doing this, SharePoint automatically creates a new item page.???Here's what our final?Catalog Source Settings?page will look like:?Click?OK, and watch some cool things happen!?What happens when I click the OK button to connect to a catalogOur Contoso site navigation now includes terms from the?Product Hierarchy?term set.If you browse to the “Audio” page, you'll see three MP3 products displayed.If you browse to the “Computers” page, you'll see three laptop products displayed.??In a later blog post, I'll explain why the correct categorized products “magically” appear when we browse through the different categories.However, for now, let’s? take a look at a?specific product.As you can see, at the moment, it's not exactly pretty to look at, but information about the product is displayed on the page, and there's also a friendly URL.Also, the terms from the?Product Hierarchy?term set have been integrated into the?Site Navigationterm set. If you want to see this in more detail, go to?Site settings --> Term store management.And two new pages have been added to the Pages library.? If you want to see this in more detail, go to?Site contents --> Pages.?So, a lot of cool things have just happened on our Contoso website. Now it is time to start improving the appearance of our pages.Stage 6: Upload and apply a new master page to a publishing siteAs described in?Stage 5: Connect your publishing site to a catalog, we connected the publishing site to our catalog. When we connected, SharePoint Server 2013 automatically created some pages for us, on which some search results where shown. These pages all have the standard SharePoint look, so now it is time to give it a "Contoso look".?In this blog post, we'll learn:About the master pageAbout the Master Page GalleryHow to map a network driveHow to turn off versioning for the Master Page GalleryHow to upload a new master pageHow to apply a new master page?Note: This blog post will?not?cover how to create a master page. It will only cover how to upload and apply an already finalized master page file and other design files that are stored locally on my computer. These files?are not?available for download.For information about how to create a master page, see?Overview of Design Manager in SharePoint 2013?and?How to: Convert an HTML file into a master page in SharePoint Server 2013.Start stage 6About the master pageWhen visitors browse our Contoso site, they'll see different content on different pages. The displayed content is a combination of a master page and page layouts.A?master page?defines the common layout and interface that you see on all your webpages, such as logo, title and navigation menu.Layout and interface for the individual pages, such as the home page, or the page that displays Audio products, are handled by?page layouts. I'll talk more about them in later blog posts.?In previous versions of SharePoint, you had to design master pages in . These master pages also had to include SharePoint specific markup, such as controls and content placeholders.In SharePoint Server 2013, you can create a master page in HTML format, and SharePoint Server 2013 will convert this into an page for you.? This means that when you design your master page, you can do this in your favorite HTML editor, focus on HTML, CSS and JavaScript, and you don't have to worry about or SharePoint-specific markup.When you add an HTML master page to SharePoint Server 2013, an associated master page will be automatically created.? Because the two files are associated, any changes you make to the HTML master page will be automatically updated in the associated master page .For more information, see?Overview of the SharePoint 2013 page model.?About the Master Page GalleryIn our scenario, we have an HTML master page and some design assets, such as a CSS file and images, that we want to upload and apply to our Contoso site. All these files are stored on my local computer.SharePoint expects to find design files in the?Master Page Gallery, so this is where we should upload the files. To get to the Master Page Gallery, go to?Site Settings?-->?Master pages and page layouts.You can use the?Upload Document?button to upload a single file to the Master Page Gallery. However, using this button every time you want to add a document can be somewhat cumbersome. To make life easy for yourself, you can map your network drive. This will enable you to drag and drop files into the Master Page Gallery with Windows Explorer.?How to map your network driveFrom Settings menu, select Design Manager?On the?Design Manager Welcome?page, click?3. Upload Design Files.On the Upload Design Files page, copy the URL to your design files.?Note: The next steps will vary depending on your computer's operating system. My computer is running Windows 8, so I will show you how to map your network drive from Windows 8.Open Windows Explorer. Right click on?Network, and select?Map network drive.In the?Folder?field, paste the URL that you copied in step 3. Click?Finish.An explorer window with your Master Page Gallery content opens.???How to turn off versioning for the Master Page GalleryIn our scenario, I am?not?using SharePoint workflows for approval. My files have already been approved, so before I upload a new master page, I want to turn off versioning for the Master Page Gallery.To turn off versioning for the Master Page Gallery:On the?LIBRARY?tab, click?Library Settings.On the?Settings?page, click?Versioning settings.On the?Versioning Settings?page, in the?Content Approval?section, for?Require content approval for submitted items, select?No.In the?Document Version History?section, for?Create a version each time you edit a file in this document library, select?No versioning.In the?Require Check Out?section, for?Require documents to be checked out before they can be edited, select?No.?Now we're ready to upload a new master page.??How to upload a new master pageBecause we have mapped our network drive, uploading a new master page becomes extremely easy. Simply drag and drop the file into your Master Page Gallery.?If you have any associated design files, such as CSS files or images, you can drag and drop these into the Master Page Gallery as well.In SharePoint, refresh the Master Page Gallery page to see that the new HTML master page has been added. However, note that an associated master page has not yet been created.?Because we dragged and dropped the HTML master page into the Master Page Galley, the content type associated with the file is?Design File. For SharePoint Server 2013 to create an associated master page, we have to change the content type for the newly uploaded HTML master file. This is done by changing the file properties.To change the file properties:On the?Master Page Gallery?page, select the newly uploaded master page, and then click?Edit Properties.In the?Content Type?section, select?HTML Master Page.In the?Compatible UI Version(s) section, select?15.On the?Master Page Gallery?page, we can see that an associated master page has been created.?We are now ready to apply our new master page.?How to apply a new master pageTo apply a new master page:From the?Site Settings?page, click?Master page?(under Look and Feel).From the?Site Master Page?section, from the?Specify a master page to be used by this site and all sites that inherit from it, select the newly uploaded master page. In our scenario, this isContosoElectronicsMaster.?By clicking on the?Audio?page, we verify that our new master page is now being used.?The next step is to start working on the page layouts.Stage 7: Upload page layouts and create new pages in a publishing siteIn?my previous blog post, I showed you how to upload and apply a new master page. The next step in giving our site a "Contoso look", is to create new pages.In this blog post we'll learn:About page layouts.About pages and rendered pages.How to upload a new page layout.How to turn off versioning for the Pages library.How to create a page based on a page layout.Note: This blog post will not cover how to create a page layout. It explains how to upload already finalized page layouts. These files will not be made available for download.?Start stage 7About page layoutsA?page layout?is a template for a page in your site. This is where you define the layout and structure for the body of a page.Page layouts contain page field controls and Web Part zones. Page field controls and Web Part zones are placeholders that define where content can be added by authors. They are added to a page layout at a specific position, for example on the left side of a column, and with specific style elements, such as bold.In my previous blog post, I explained how?SharePoint Server 2013 automatically converts an HTML master page into an page. The same rule applies to page layouts - you can create a page layout in HTML format, and SharePoint Server 2013 will automatically convert it into an page for you.? This means that when you design your page layout, you can do this in your favorite HTML editor, focus on HTML, CSS and JavaScript, and you don't have to worry about or SharePoint-specific markup.For more information, see?Overview of the SharePoint 2013 page model, and?How to: Create a page layout in SharePoint Server 2013.?About pages and rendered pagesIt is important to understand that authors do not add content to a page layout.? Content is added to apage.?A page is created based on a specific page layout. Once you've created a page, authors can add content that they want to display on their website to the page. Because the page is based on a page layout with page field controls and Web Part zones, authors cannot add content outside of these areas.When visitors browse a site, they will see a rendered page. In a rendered page, the master page is merged with the page layout, and the content for the page is displayed in the page fields and Web Part zones.For more information, see?Overview of the SharePoint 2013 page model.?How to upload a new page layoutIn our Contoso scenario, we have two page layouts; one for the category page, and one for the catalog item page.In my previous blog post, I showed you how to?map a network drive. Because we have mapped our network drive, uploading these page layouts becomes very easy. Simply drag and drop the files into your Master Page Gallery.In SharePoint, refresh the?Master Page Gallery?page to see that the two page layouts have been added. Also notice that an associated file has been created for each of the page layouts.?How to turn off versioning for the Pages LibraryIn our scenario, I am not using SharePoint workflows for approval. My files have already been approved, so before I create a new page, I want to turn off versioning for the Pages library.To turn off versioning for the?Pages?library:From the?Site Settings?menu, select?Site contents.On the?Site Contents?page, click?Pages.In the?Pages?library, on the?LIBRARY?tab, click?Library Settings.On the?Settings?page, click?Versioning settings.In the?Require Check Out section, for?Require documents to be checked out before they can be edited, select?No.We are now ready to create our two new pages.?How to create a page based on a page layoutTo create a new page:On the?Site Contents?page, click?Pages.In the?Pages?library, click the?FILES?tab, and then click?New Document.?On the?Create Page?page, enter a?Title?and a?URL name. From the?Page Layout?list, select the page layout that you want to apply to the new page. In our scenario, the page layout is the? newly uploaded page layout called?ContosoElectronicsCategoryPageLayout.?After you click?OK, the newly created page is shown in the?Pages?library.In our Contoso scenario, we will also need a catalog item page. To create this page, I repeat steps 3 and 4 from the previous procedure, however for?Page Layout, I selectContosoElectroniceCatalogItemPageLayout.?Our Pages library now contains two new pages:?ContosoCategoryPage?and?ContosoCatalogItemPage.Now that we have created these pages, the next step is to assign them to the terms that drive our site navigation.Stage 8: Assign a category page and a catalog item page to a termIn previous steps we have:Verified that the?Site Navigation?term set drives?managed navigation?for our Contoso site.Specified full site navigation?by integrating term from the?Product Hierarchy?term set into the?Site Navigation?term set on the publishing site collection.Created?a category page and a catalog item page from a page layout.In this step, we will assign these newly created pages to the terms within the?Site Navigation?term set.In this blog post we'll learn:About managed navigation.About the category page and the catalog item page.How to assign a category page and a catalog item page to a term.About the friendly URL for category pages?Start stage 8Before we begin the task of assigning a category page and a catalog item page to a term, I want to explain a bit more about some of the features that are involved when doing this task.?About managed navigationManaged navigation is new in SharePoint Server 2013. This navigation method lets you define and maintain your site navigation by using term sets.One of the benefits of using managed navigation is that it separates the site navigation from the location of your content. With managed navigation, it's not the location of your content that defines where in the navigation your content will appear, but how you tag your content with terms from a term set. For example, in previous versions of SharePoint, if you wanted to add a new page under "About our company," you had to add that page under the "About our company" branch within your content. With managed navigation, you can add a page to?the branch that makes the most sense to you. By tagging?that page?with a term, and using Search Web Parts, it will appear in the correct place in the navigation.Another benefit of managed navigation is that it creates friendly URLs. In previous versions of SharePoint, the URL to a page contained a reference to the?Pages?library and any folders within that library, for example:?. With managed navigation, URLs are based on the terms in the term set that drives your site navigation, for example: a previous blog post, I showed you how terms from the?Product Hierarchy?term set?will be used?tocreate a friendly URL.Important: Managed navigation is not tied to a publishing method, and can be used?both?for author-in-place and for cross-site publishing. For more information, see?Overview of managed navigation.?About the category page and the catalog item pageWhen you display information in a catalog format, the layout and structure of the category pages should be consistent across the catalog. For example, in our Contoso scenario, we want the category page for all MP3 players to have the same layout as the category page for all camcorders.Also, no matter what type of product a visitor views, the catalog item page should be consistent. For example always display an image of a product in the top left corner, followed by tables of product specifications.??By combining managed navigation with category pages and catalog item pages, you don't have to create several pages for your catalog categories or for your catalog items. For example, in our Contoso scenario, we will use only use the two pages we created in?Stage 7.So, after all that theory, in the next section, I will finally show you how you can do this.?How to assign a category page and a catalog item page to a termIn?Stage 7, we created a new category page and a new catalog item page. Now we want to associate these pages with the terms in the term set that drive?site navigation.On the Contoso site, go to?Site settings?and then?Term store management.In the?TAXONOMY TERM STORE?section, click a term, for example "Audio," and then click theTERM-DRIVEN PAGES?tab.In the?Target Page Settings?and?Catalog Item Page Settings?sections, there are four references pointing to two pages:?Category-Electronics.aspx?and?CatalogItem-Electronics.aspx.Remember in Stage 5 when we connected our publishing site to our catalog? In that stage, a category page and a catalog item page were?automatically created and added to the?Pages?library.? What I didn't tell you in Stage 5 is that references to these pages were added to this term set, as shown in the image above. In the next steps we will change these references so that they point to our newly created category page and catalog item page.In the?Target page settings?section, do the following:In the?Change target page?for this term?section, click?Browse.In the?Select an Asset?dialog box, click?Pages, and then select the category page you want to apply. In our scenario, this is?ContosoCategoryPage.aspx.?By setting this reference, when visitors browse to "Audio" on the Contoso site, the pageContosoCategoryPage.aspx?will be used to display information. It is important to understand that visitors will not see the page name?ContosoCategoryPage.aspx, but instead a friendly URL (I talk more about this in the?last section?of this blog post).?In the?Change target page for children of this term?section, repeat steps 3a and 3b. By setting this reference, when visitors browse to a child term of "Audio," for example "Speakers," the page?ContosoCategoryPage.aspx?will be used to display information.?In the?Catalog Item Page Settings?section, do the following:In the?Change Catalog Item Page for this category?section, click?Browse.In the?Select an Asset?dialog box, click?Pages, and then select the category page you want to apply. In our scenario, this is?ContosoCatalogItemPage.aspx.By setting this reference, when visitors browse to an item that has been tagged with the term "Audio,” the page?ContosoCatalogItemPage.aspx?will be used to display information.In the section?Change Catalog Item Page for children of this term, repeat steps 4a and 4b. By setting this reference, when visitors browse to an item that has been tagged with a child term of "Audio,” for example "Speakers,” the page?ContosoCatalogItemPage.aspx?will be used to display information.Repeat steps 2 - 4 for all terms to which you want to assign a category page and an item details page. In our scenario, we'll do this to all terms within the?Site Navigation?term set.?After applying the new category page and catalog item page to all terms, you can browse to a category page to verify that the correct page is being used.? In our scenario, when we browse to "Audio,” there's not much to see.This is good, because when we created the category page in?Stage 7, we created an empty page.To display content, we will have to add Search Web Parts. I will show you how to do this in my next blog post.?About the friendly URL for category pagesWhen you use managed navigation, the friendly URLs that visitors see are composed of the terms from the term set that drives site navigation. To see how friendly URLs are composed, do the following:On the?Term Store Management Tool?page, click a term, for example "Audio," and then click theTERM-DRIVEN PAGES?tab.The friendly URL is displayed in the?Configure Friendly URL for this term?section.Similarly, when you click on "Car audio,” you'll see the friendly URL for this page.If you want to change a friendly URL, for example from "audio" to "audio players,” you should change the actual term itself. That way, the friendly URL and the term that is used to tag your content will remain consistent.If this was somewhat confusing, don't worry. I will explain more about how Search Web Parts work in the next blog post.Stage 9: Configure the query in a Content Search Web Part on a category pageIn previous blog posts, I showed you how to?create a category page and a catalog item page. I also showed you how to?assign these two pages to?terms?within the?Site Navigation?term set.? When?we browsed to the "Audio" category,?we couldn't see any content. This?was because when we created the category page, we didn't add any Web Parts.??In this stage we will start to merge different pieces of what we have done in previous steps. In this blog post we'll learn:About the Content Search Web PartHow to add a Content Search Web Part to a pageHow to configure a query in a Content Search Web Part on a category pageAbout the query configurationHow to view details of the query configuration?Start stage 9To display content on our Contoso website, we'll use the Content Search Web Part.?About the Content Search Web PartThe Content Search Web Part (CSWP) uses, as its name implies, search technology.Most of us use search technology on a daily basis. Think about how many times a day you enter query terms in a search box, for example on ; how after pressing Enter, you scan search results that are almost immediately displayed on a search results page (by the way, how did you find this blog post?).When visitors browse to a page that contains a CSWP, they're probably not aware of this, but they're actually issuing a query. However, the thing that differs with CSWPs is that instead of entering query terms in a search box, the query is contained within the Web Part itself. This means that when a visitor browses to a page that contains a CSWP, this query is automatically issued.Another thing that is different from the search scenario is that search results aren't displayed on a separate search results page, but within the CSWP. In most cases, visitors won't even know that search technology is being used to display the content they're viewing. To them, it'll look and feel like any other webpage.?How to add a Content Search Web Part to a pageBrowse to the page where you want to add the CSWP. In our scenario, let's browse to "Audio".Click the?Settings?menu, and then click?Edit Page.In the Web Part Zone where you want to add the Web Part, click?Add a Web Part.In the?Categories?list, click?Content Rollup.In the?Parts?list, click?Content Search, and then click?Add.In our scenario, we'll add a CSWP to Zone 3.The CSWP contains a default query, so it already displays some content (Audio, Cameras and Computers) -- but not the content we want to display. To make the Web Part display Contoso catalog content , we'll need to configure the query in the Web Part.?How to configure a query in a Content Search Web Part on a category pageIn the Web Part, click the?Web Part Menu?, and then click?Edit Web Part.In the Web Part tool pane, click?Change query. This will open a dialog box.In the dialog box, notice that "Audio" is shown in the top left corner. This is the category which we navigated to and selected to edit the page from. Also notice, that in the?RelevantResults?section, the top three results,?Audio,?Cameras?and?Computers, are listed. These are the same three results that were shown in the Web Part when we added it.From the?Select a query?list, select your catalog result source. In our scenario, it's?catalog - Products Results.A result source narrows the scope from which search results can be retrieved. When we?connected our publishing site to our catalog, SharePoint Server 2013 automatically created a result source for our catalog. In our scenario, this result source is named?catalog - Products Results. By selecting this result source, only search results from our catalog are retrieved.For more information about result sources, see?Plan result source and query rules.When we selected this result source, the number of?RelevantResults?changed from 864 to 775. 775 happens to be the number of items we have in our catalog. Therefore, selecting this result source confirms that we're on the right path to configuring the query.In the?Restrict by tag?section, select?Restrict by current and child navigation terms.A key phrase in this selection is?navigation terms. This refers to the category in the site navigation the visitor is browsing. In this particular case, the visitor is browsing the "Audio" category.?Remember, one of the first things we did in this series was to import catalog content into a list. We also imported terms into the term set?Product Hierarchy, and?associated each item in the list with a term from that term set.? When we connected our publishing site to our catalog, we specified that thefull site navigation?should contain terms from the?Product Hierarchy?term set. Because we have usedthe same term set?to tag the items in our catalog and to build our site navigation, we can use a term from our site navigation to search for catalog items that have been tagged with that same term.So, our query in the CSWP will therefore display search results for items that are in the?catalog - Products Results result source, and that have been tagged with either "Audio", or any of the children of "Audio", for example "MP3 players" or "Speakers".This selection reduced the relevant search results to 114, which happens to be the number of items in our catalog that belong to the "Audio" group.Another key phrase from the selection?Restrict by current and child navigation?terms is "current." I'll talk more about the importance of this phrase in the?next section.Click?OK, and save the page.On the "Audio" category, the search results have changed to show different results.If you browse to the "Cameras" category, you'll see three other search results displayed.If you browse to the "MP3" category, you'll see three other different search results are displayed.If you are now thinking "OK, I understand how we got the correct search results for the "Audio" category, because that is the category we clicked, and where we changed the query in the Web Part. But why do we see different search results when we browse the catalog? And shouldn’t we change the query for all the other categories as well?"Well, let's take a closer look at what's going on.?About the query configurationWe only had to configure one query because the same page is used for all categories. Remember how in stage 8 we assigned the page?ContosoCategoryPage.aspx to all terms?within the?Site Navigation?term set? We assigned this page to?all?terms, so even though we edited this page in the "Audio" category, we could have edited it in any other category, and achieved the same result.We only had to configure the query once, because the query issued from the Web Part differs depending on which category we browse to. Remember that the CSWP contains a query that is automatically issued whenever someone browses to a page that contains a CSWP, and that search results are displayed in the Web Part. Also, remember that we selected?Restrict by current and child navigation terms?when we configured the query in the Web part. The word "current" is very important, because it means that the query issued by the CSWP will change depending on the category the visitor is currently browsing. If you edit the Web Part from another category, you can see that the Web Part has changed.For example, if I browse to the "Cameras" category and take a closer look at the CSWP, I can see that:"cameras" is included in the URL."Cameras" is in the top right corner of the query configuration.The number of?RelevantResults?has changed to 118, which happens to be the number of items in the catalog that belong to the "Cameras" group.So, when I browse to the "Audio" category, the CSWP issues a query for catalog items that have been tagged with "Audio" or any children of "Audio", and displays search results. When I browse to the "Cameras" category, the same CSWP (remember, we only used one page for all categories) issues a different query, this time for catalog items that have been tagged with "Cameras" or any children of "Cameras", hence different results are displayed.?How to view details of the query configurationTo view details of the query configuration, click on the?TEST?tab. The actual query issued by the CSWP, is shown in the?Query text?field.In our example, the query that is issued by the CSWP from the "Audio" category looks like this:(contentclass:sts_listitem OR IsDocument:True) SPSiteUrl: ListId:3a3f66cd-9741-4f15-b53a-b4b23c3187ea owstaxidProductCatalogItemCategory:#c771504f-6a2f-423f-98de-0e12fcfa08c9If this doesn't make any sense to you, don't worry!? There is a logic to it, and I'll break it down to make it clearer.(contentclass:sts_listitem OR IsDocument:True) SPSiteUrl: ListId:3a3f66cd-9741-4f15-b53a-b4b23c3187ea?is our catalog result source,?catalog - Products Results?owstaxidProductCatalogItemCategoryis the managed property for the site column Item Category (remember, our?Product Hierarchyterm set is?tied to the Managed Metadata site column?Item Category)?#c771504f-6a2f-423f-98de-0e12fcfa08c9is the GUID of the term in the current navigation, in this case "Audio"?In our Product catalog site collection, in the?Product Hierarchy?term set, you can see that the GUID represents the term?Audio.?So now we have configured the query for the CSWP on our category page. We still have to do some configuration to make it display more than three search results, and also give it a "Contoso look." I will show you how to do this in a later post. The next step is to add a CSWP to our catalog item page, and configure the query to show individual catalog items.Stage 10: Configure the query in a Content Search Web Part on a catalog item pageIn previous blog posts, I showed you?how to add a Content Search Web Part to a page, and how to configure the query for a catalog page. The next step is to do the same for the catalog item page.In this blog post we'll learn:Defining how catalog items should be displayed on our Contoso siteHow to add a Content Search Web Part to a catalog item pageAbout query variablesHow to configure a query in a Content Search Web Part on a catalog item page??Start stage 10Defining how catalog items should be displayed on our Contoso siteThe various products featured in the Contoso catalog are all available in different colors. For example, by looking in our catalog list, you’ll see that the?Northwind Traders 50W Car Radio?is available in five different colors. The color versions of a product are grouped under a common?Group Number.When displaying a product on our Contoso site, visitors should easily see that the product exists in other colors. For example, when visitors browse to a silver colored version of the?Northwind Traders 50W Car Radio, they should easily see which other color options are available for that item. They should also be able to quickly view details about the product in another color, without having to go back to the category page.So, on our catalog item page we want to display items that have the same?Group Number. To do this, we’ll have to use the Content Search Web Part (CSWP).Note:?The item details page that was automatically created?when we connected our publishing site to our catalog contained several Catalog Item Reuse Web Parts (CIRWP). There are scenarios where using CIRWPs to display item detail content would be appropriate. However, because the CIRWP is only able to display one item at a time, we can't use this Web Part for our Contoso scenario.?For information about how to customize the automatically created catalog item page using CIRWPs, see?How to: Customize page layouts for a catalog-based site in SharePoint 2013.?How to add a Content Search Web Part to a catalog item pageBrowse to the catalog item page. In our scenario, click the item "Northwind Traders 50W Car Radio" in the "Audio" category.This page doesn't show any content. This is because we didn't add any Web Parts to the page when we?created it.Our catalog item page only has one Web Part zone. To add a CSWP to our catalog item page, repeat the steps from?How to add a Content Search Web Part to a page, and add the Web Part to Zone 1.As was the case when we added a CSWP to our category page, the Web Part displays some content (Audio, Cameras and Computers) -- but not the content we want to display. To make the Web Part display Contoso catalog content, we'll need to configure the query in the Web Part. To configure the query, we’ll use what’s known as a query variable. However, before we move on, let me first explain what query variables are, and how they’re used when configuring a query.?About query variablesA query variable is a placeholder that is replaced with a value when a query is run.I completely understand if you thought that definition was as clear as mud, so let me try to explain it in the context of our Contoso scenario.?You might not have been aware of it, but in?Stage 9?when we configured the query in the CSWP on the catalog page, we used a query variable. Here’s what we did: When we selected?Restrict by current and child navigation terms, a query variable was added to our query. That query variable was a placeholder for the navigation value in the URL (audio, camera, mp3 etc.). Whenever a visitor clicked a category, the query variable in the Web Part was replaced with the navigation value in the URL. As a result, the Web Part issued a query for catalog items that had been tagged with "audio", "camera", "mp3" ing back to our catalog item page, we want to display items that have the same?Group Number. Remember how in?Stage 3?we added?Group Number?as one of the list columns to be used as aCatalog Item URL Field. We did this so that the value of?Group Number?would be used in the URL.The image below shows our final Contoso site. Notice that the group number,?5637145950, is used as the second to last value in the URL.If we browse to another product, we’ll see that the group number for this product,?5637145875, is also used as the second to last value in the URL.So, when configuring the query for the CSWP on our catalog item page, we should use a query variable that will represent the second to last value in the URL.Query variables are contained within curly brackets like this: {QueryVariable}. I don't know about you, but I always get a bit edgy whenever I see these kinds of brackets, because they usually mean we are moving into something complex.? But not to worry, it's not as scary or as complex as it looks.As I mentioned above, when we configured the query in the CSWP on the catalog page, we used a query variable. However, we never had to deal with any scary looking curly brackets, because the nice-looking radio button,?Restrict by current and child navigation terms, took care of that for us.? To configure the query for our item catalog page, we’ll have to add a query variable with curly brackets. Luckily, we’ll have some friendly pull-down menus to help us along. So let's dive into the task of configuring the query.?How to configure a query in a Content Search Web Part on a catalog item pageIn the Web Part, click the?Web Part Menu?-->?Edit Web Part.In the Web Part tool pane, click?Change query. This opens a dialog box.In the dialog box, from the?Select a query?list, select your catalog result source. In our scenario, it's?catalog - Products Results.Click?Switch to Advanced Mode.In Advanced Mode, in the?Query text?field, you’ll see some text. This is the query text that represents our result source?catalog - Products Results?(we saw the same query text in Stage 9 when we learned about?How to view details of the query configuration).In the?Property filter?list box, select?Show all managed properties.???In the?Property filter?list box, select?ProductCatalogGroupNumberOWSTEXT,?Contains?andValue of a token from URL.??ProductCatalogGroupNumberOWSTEXT?is the managed property name of the site column?Group Number?(remember how I showed you the?naming convention for this column?in an earlier blog post).Contains?and?Value of a token from URL?will create the query variable we want to use.Click?Add property filter.Notice that?ProductCatalogGroupNumberOWSTEXT:{URLToken.1}?has been added to the?Query text?field. So without having to know about query syntax or type in a curly bracket, we’ve added a query variable.So now you might be thinking "OK, that was easy, but what doesProductCatalogGroupNumberOWSTEXT:{URLToken.1}?actually mean?"? Well, let me break it down :ProductCatalogGroupNumberOWSTEXT?is the managed property that represents the?Group Number?column in our catalog.The colon?:?means "contains"{URLToken.1}?represents a value from the URL of the current page.? The integer, in this case?1, represents the value in the URL as counted from right to left. So, for example, in the URL, the query variable {URLToken.1} represents the value?6637146586.If we put the entire query together, this query means the following:From the result source?catalog - Products Results, search for items where the value of the managed property?ProductCatalogGroupNumberOWSTEXT?contains the value that is currently used as the first value in the URL, counting from right to left.In Stage 3, we defined that the item URL should contain both?Group Number and Item Number as catalog Item URL Fields. This means that the first value in the URL, counting from right to left, is?Item Number. We want to search for items that have the same?Group Number, so we need to make a small change to the query variable.In the?Query text?field, change the number in the query variable to?2.Now the query in the Web Part will search for items where the value of the managed propertyProductCatalogGroupNumberOWSTEXT?contains the value that is currently used as the?second?value in the URL, counting from right to left.To test that this query returns the correct results, click?Test query.Notice that five items are displayed under?RelevantResults. This verifies that the query is correct, because we know that that the?Northwind Traders 50W Car Radio?is available in five different colors.Click?OK?and save the page.Even though this looks far from our desired outcome (three products are displayed instead of only one, we still don’t have a "Contoso look"), believe me, this is progress. The query in the Web Part has now been configured. In the next blog post, I’ll show you how to add display templates that will give our items the Contoso look.Stage 11: Upload and apply display templates to the Content Search Web PartIn previous blog posts, I showed you how to configure the query for a Content Search Web Part on acategory page?and a?catalog item page. Although the query results displayed in the Web Parts were correct, they did not have a Contoso look, and they only displayed a title and a strange looking gray box.In this blog post we'll learn:About display templatesHow to upload display templatesHow to apply display templates to a Content Search Web Part??Start stage 11About display templatesDisplay templates are used to control how content should be displayed in a Content Search Web Part (CSWP). Remember that the content that is displayed in a CSWP is composed of search results that are returned based on the query that is defined in the Web Part. So, when you customize a display template, you are basically customizing how search results should be displayed in the Web Part.Each display template consists of two files:An HTML file that you can edit in an HTML editor of your choiceA JavaScript fileAs with master pages and page layouts, you can edit the display template in your favorite HTML editor. When editing the display template, you can focus on HTML, CSS and JavaScript. SharePoint automatically transforms the HTML file into an associated JavaScript file when you upload it. Because the two files are associated, any changes you make to the HTML file will be automatically updated in the associated JavaScript file.There are two types of display templates:Control display template?- defines the overall layout for how search results should be displayed. For example, this can be how you choose to display the HTML for a heading, the beginning and end of a list, or how to page back and forth in a list of results. The control display template is only rendered once in the Web Part.Item display template?- defines how each item in the search results should be displayed. For example, this can be how you choose to display an image, and the title of a search result, where the title is displayed as a hyperlink below the image. The item display template is rendered one time for each item in the search result. So, in practice, if ten search results are returned, the item display template creates its section of HTML ten times.The image below shows how the control display template and item display templates are used on the CSWP of our category page.For more conceptual information about display templates, and for details about how to create your own display templates, see?SharePoint 2013 Design Manager display templates.?How to upload display templatesFor our Contoso site, we have four display templates:One control display template for our category pageOne item display template for our category pageOne control display template for our catalog item pageOne item display template for our catalog item pageBecause we have?mapped our network drive, uploading these display templates is a piece of cake. Simply drag and drop the files into the folder located in?Master Page Gallery?-->?Display Templates-->?Content Web Parts. The exact location of where you drag and drop the files, isn’t that important as long as it is in the Master Page Gallery.? However, as the?Content Web Parts?folder is where the other display templates for Content Web Parts are located, we'll add them there.In SharePoint, go to?Site settings?-->?Master pages and page layouts?-->?Display Templates --> Content Web Parts, and check that the four files have been added. Also notice that an associated .js (JavaScript) file has automatically been created for each display template.So now we’re ready to apply these display templates to our Content Search Web Parts.?How to apply display templates to a Content Search Web PartWe first want to apply display templates to the CSWP on our category page, so let's browse to "Audio."Click the?Settings?menu -->?Edit Page.In the Web Part, click the?Web Part Menu?-->?Edit Web Part.In the Web Part tool pane, in the?Display Templates?section, to apply the control display template, from the?Control?menu, select your control display template. In our Contoso scenario, this is?Contoso Electronics List with Paging.To apply the item display template, from the?Item?menu, select your item display template. In our scenario, it’s?Contoso Electronics Product gallery.Click?OK, and then save the page.?Suddenly, our "Audio" page is looking like it has been?to one of those makeover shows.?Instead of the strange looking?gray?box, there’s a colorful?image that displays for each item, and we’ve also added the price and rating information that was stored in the site columns of our catalog. But it is only displaying three items,?so we'll have to do something about that.Click to edit the Web Part again. In the?Number of items?to show field, change the value from 3 to 9.?Click?OK, and then save the page.Now our "Audio" page is?looking really?good. By using the paging arrows, we can easily browse through the different items in the "Audio" category.So now that our category page has gotten a Contoso look, the next step is to apply display templates to the CSWP on our catalog item page.Browse to the catalog item page. In our scenario, we can do this by clicking on the item "Northwind Traders 50W Car Radio" in the "Audio" category.Repeat steps 1 -?7 in?How to apply display templates to a Content Search Web Part?above, but select the control- and item display templates for the catalog item page.?And now your item details page has also gotten a very nice Contoso look.?By using the Color selection menu, we can easily page through the items with different colors.So now our Contoso site is really starting to look good. But looks is one thing. We also have to make sure that our visitors are able to browse and rapidly find the product they are looking for. The next step is to start considering which refiners we want to use on our site.Stage 12: Plan to use refiners for faceted navigation - Part Ipost in the series “How to set up a product-centric website in SharePoint Server 2013.”? In this series, I'll use data from a fictitious company called "Contoso" to show you how to use search features to set up a website based on product catalog data.?Note: Most of the features described in this series are not available in SharePoint 2013 Online.For an overview of the blog posts in this series, go to?How to set up a product-centric website in SharePoint Server 2013.?Quick overviewIn previous blog posts, I showed you how to?upload and add display templates to a Content Search Web Part. Our Contoso site is starting to look really good, and now we have to make sure that visitors will quickly be able to find the product they are looking for.This blog post will focus on what we have to plan before configuring refiners. We'll learn:How refiners helped me plan my trip to JapanAbout refiner typesAbout identifying refiners for faceted navigation?Start stage 12?How refiners helped me plan my trip to JapanAlthough the term "refiners" might sound new to you, there is a high chance you’ve already used them, and a lot more often than you think.? For example, have you ever bought a book online? Well, then most likely refiners were there to help you find the right book. I recently went online to my favorite book store to find a travel guide about Japan. I typed in "Japan," and as you can imagine, pages of search results popped up. Trawling through pages of results is not my idea of fun. Luckily for me though, the site designers had smartly provided a way to narrow down search results. On the left side of the page was a "Categories" list, containing entries such as "Cooking," "Geography," "History," "Travel" and so forth. I clicked "Travel," and in an instant, the search results showed only travel books containing the word "Japan." However, turns out that there are quite a few travel books out there on Japan, so I needed to trim the results even further. I was looking for a paperback version (yes, I admit that there are still dinosaurs like me around who prefer the look and feel of a book made out of paper…). So, still focusing on the lists on the left side of the page, I spotted a category called "Format" containing terms like "Hardcover," "PDF," "Audio," Digital," and "Paperback. " So I clicked "Paperback" and got what I’d been after: results for travel books about Japan in paperback! Unfortunately, the number of search results was still too large for me, so I continued to use the different lists on the left side of the page until I’d drilled right down to five hopeful candidates; one of which made it over the finish line, and straight into my shopping cart.Now, here’s the techy part to the tale: when I was clicking "Travel" and "Paperback" I was, in fact, using refiners. In SharePoint terms, a refiner is a managed property that has been enabled as a refiner. Refiner values are the values of a managed property that has been enabled as a refiner. So in the case of my online shopping trip, "Categories" and "Format" were?refiners, and "Travel" and "Paperback" were?refiner values.Remember I showed you how a?site column is represented as a managed property after being crawled? For example, in our Contoso catalog we have a site column named "Contoso Color."? For each item in our catalog, we have added a color value, such as red, green or blue, to this column. If we want visitors to quickly narrow search results, for example, to a particular color, in the same manner that I did when shopping for a travel book on Japan, we have to enable the managed property that represents the "Contoso Color" site column as a refiner. There is, of course, more to it than that, and I will show you all these steps in later blog posts.?About refiner typesThere are two types of refiners:Stand-alone refinersRefiners for faceted navigationGoing back to the scenario about finding a travel book about Japan, I used stand-alone refiners. Stand-alone refiners are usually applied in scenarios where you have unstructured content, and where the refiners can be applied across all content. These refiners are often used on a search results page to narrow down search results.Now, you might be thinking that stand-alone refiners seem like an excellent refiner type to use on a search results page. But what about a scenario like our Contoso site, where we are showing catalog content? On our Contoso site, visitors want to browse the catalog to find what they are looking for, so they will not enter any words into a search box. Well, remember that we are using a?Content Search Web Part to display content on our category page. Because the Content Search Web Part is using search technology to display search results, we can use refiners to narrow down search results that are displayed in the Content Search Web Part.OK, so we can use refiners on our category page. That’s nice, but again you might be thinking: What if we want to use different refiners for different categories? For example, on the "Televisions" category, we want visitors to be able to refine on "Screen Size."? On the "Air conditioners" category it doesn't make sense to have a refiner called "Screen Size," so we do not want to display it there. However, we do want visitors to be able to refine on "Installation type." In addition, there are some common refiners that should be applied to all categories, such as "Brand."?Well, you might have guessed it; you can achieve all of this with?refiners for faceted navigation.?Refiners for faceted navigation is a new feature in SharePoint Server 2013. This feature enables website visitors to narrow search results by filtering on category specific refiners. They’re the type of refiners we need for our Contoso site. However, before I show you how to configure and add them, we should first work out which refiners we want to show, and how we want the refiner values to be displayed.???About identifying refiners for faceted navigationWhen identifying refiners for faceted navigation, you need to find properties that contain certain pieces of information. Here’s what you should look for:Information that website visitors will want to use to narrow down search rmation that can be applied to all rmation that can be applied to only a sub-set of categories.For our Contoso site, I’ve identified a total of 14 properties that I want to use as refiners.?Of these 14 properties, only three represent information that can be applied to all categories. This means that we have 11 properties that apply to a subset of the categories.Adding refiners for faceted navigation is done on the tagging term set on the authoring side. When specifying which refiners to use in which category, it’s helpful to use the tagging term set as a guide. In our Contoso scenario, this is the?Product Hierarchy?term set.By default, all children of a term inherit refiners that have been added to a parent term. For example, a refiner that is added to the term "Cameras" will be applied to all its children, such as "Camcorders,” "Camera accessories," etc.? You can override this inheritance to add or remove refiners for a child category. I will show you how this is done in later blog posts though; for now, let's concentrate on the planning part.To save space, I’m not going to show you the complete faceted navigation structure of our Contoso site. Instead, in the table below, I’ve listed the refiners we want to use for the categories "Audio" and "Cameras," and to which term we want to assign them.Product Hierarchy term setRefiners?Electronics???Price,?Brand,?Color??Audio??Inherit from Electronics??Car audio??Inherit from Audio???Headphones?Inherit from Audio???MP3?Inherit from Audio???Speakers?Inherit from Audio??Cameras??Inherit from Electronics +?Zoom,?Screen?size???Camcorders?Inherit from Cameras???Camera accessories?Inherit from Cameras???Digital cameras?Inherit from Cameras +?Mega pixels???Digital SLR cameras?Inherit from Cameras +?Max ISONow that we’ve identified which refiners to use, the next thing to consider is how we want the refiner values to be displayed.Basically, there are two ways refiner values can be displayed: as a list, or grouped in intervals. For refiner values that use the data type?Text,?Person or Group,?Choice?or?Yes/No, there’s not really much to consider. These refiner values will most likely always be displayed in a list as shown in the screenshot below.However, when it comes to numeric refiner values, the story is somewhat different. For example, consider all the refiner values for a refiner such as?Price. In our Contoso scenario, it could overwhelm our visitors with information and would therefore not be of much us.For these types of refiner values, it would be much more helpful to display them in grouped intervals, as shown right below.The table below lists the refiners we want to use for the categories "Audio" and "Cameras". It also lists the property type and the display format we want to use for the refiner values.RefinersProperty typeDisplay format for refiner values?Price?Number?Intervals?Brand?Text?List?Color?Text?List?Zoom?Number?List?Screen type?Number?List?Mega pixels?Number?List?Max ISO?Number?ListIt’s important to define how you want your refiner values to be displayed because the different display options are tied to the property type.? If that didn't make much sense to you, don't worry: I’ll explain more with examples in my next blog post.Stage 13: Plan to use refiners for faceted navigation - Part IIIn our?previous blog post, we identified the refiners we want to use for faceted navigation, and determined how we want the refiner values to be displayed. In this blog post we'll learn:About enabling a managed property to be a refinable managed propertyAbout refiner-enabled managed propertiesAbout defining the refiner-enabled managed properties to use in our Contoso scenario??Start stage 13About enabling a managed property to be a refinable managed propertyThe first thing we have to do when configuring refiners for faceted navigation is to enable the managed properties that we want to use as refiners to be refinable managed properties.Depending on your permission level, you can do this from two places:To refiner-enable a managed property fromRequires permission levelCentral AdministrationSearch service application administratorSite Collection AdministrationSite collection administratorThere’s a reason why this can be done from two places: if you are working with catalog content (let's say you’re a content manager), you’re?not?likely to have Search service application administration level rights, that is, you won’t have access to Central Administration. However, you’re very likely to have Site collection administrator permissions.In an earlier blog I described how?content managers can easily add content to the search index without having to pester Search service application administrators. So now that everyone’s happy, we don't want to jeopardize this happiness by making content managers dependent on a Search service application administrator to enable refiners.In this blog post I’ll only describe the procedure as it would be performed by a Site collection administrator (content manager). For information on how Search service application administrators can enable managed properties to be a refinable managed property, see?Enable automatically created managed properties as refiners in SharePoint Central Administration.??About refiner-enabled managed properties?At the beginning of this post, I stated "The first thing we have to do when configuring refiners for faceted navigation, is to enable the managed properties that we want to use as refiners to be refinable managed properties."?Well, turns out that Site collection administrators (content managers) can't do this because they don't have the required permission level. They do, however, have the permission level to map a crawled property to a refiner-enabled managed property.Confused? I don't blame you, so let me try to explain.Search service application administrators, who have access to Central Administration, can configure many things directly on a managed property. For example, the screenshot below shows how they can change the property named?RedBrand?to be refinable by selecting either?Yes – active, or?Yes - latentfrom the?Refinable?menu.If we look at the same property from the perspective of a Site collection administrator, who?is configuring the property on the?site collection level,?not only is the property name grayed out, but theRefinable?choice menu is locked (it might not show as well on the screenshot, but trust me; the field is locked).Luckily, there are a large number of "empty" managed properties that by default are enabled as refiners. By "empty" I mean that a crawled property is not mapped to it. This means that Site collection administrators can map a crawled property to one of these refiner-enabled managed properties without having to rely on a Search service application administrator.The table below gives an overview of the managed properties that are enabled as refiners by default.Managed property nameData type for mappingDisplay format for refiner valuesRefinableDate00 - RefinableDate19Values contain datesIntervalsRefinableDecimal00 - RefinableDecimal09Values contain numbers with maximum three decimalsIntervalsRefinableDouble00 - RefinableDouble09Values contain numbers with more than three decimalsIntervalsRefinableInt00 - RefinableInt49Values are whole numbersIntervalsRefinableString00 - RefinableString99Values are strings. This includes values that use the data type Text, Person or Group, Managed Metadata, Choice and Yes/NoListIn the previous blog post, we listed the properties that we wanted to use as refiners for the categories "Audio" and "Cameras."? Now we need to add a fourth column to this table. For each refiner that we want to use, we need to define a refiner-enabled managed property. We’ll then map the crawled property that represents the refiner to each of these refiner-enabled managed properties.Refiner to useProperty typeDisplay format for refiner valuesRefiner-enabled managed property?Price?NumberIntervals?TBD?Brand?Text?ListTBD?Color?Text?ListTBD?Zoom?Number?ListTBD?Screen size?Number?ListTBD?Mega pixels?Number?ListTBD?Max ISO?Number?ListTBD?About defining the refiner-enabled managed properties to use in our Contoso scenarioFor refiners of type Text, it’s pretty straight forward. For these, we can use two of the?RefinableStringmanaged properties. This is highlighted in the table below.Refiner to useProperty typeDisplay format for refiner valuesRefiner-enabled managed property?Price?NumberIntervals?TBD?Brand?Text?ListRefinableString01?Color?Text?ListRefinableString02?Zoom?Number?ListTBD?Screen size?Number?ListTBD?Mega pixels?Number?ListTBD?Max ISO?Number?ListTBDWhen it comes to numeric refiners, things get a bit trickier because we have to consider what type of numeric values we are dealing with, and how we want the refiner values to be listed. Let's start with the numeric refiner?Price. In our Contoso scenario, the values for?Price?are whole numbers. A?RefinableIntmanaged property can be used for whole numbers, and it displays refiner values in intervals. As I showed in the previous blog post, we want to?display our?Price?refiner as intervals, so for this refiner, we can use one of the?RefinableInt?managed properties. This is highlighted in the table below.Refiner to useProperty typeDisplay format for refiner valuesRefiner-enabled managed property?Price?NumberIntervals?RefinableInt01?Brand?Text?ListRefinableString01?Color?Text?ListRefinableString02?Zoom?Number?ListTBD?Screen size?Number?ListTBD?Mega pixels?Number?ListTBD?Max ISO?Number?ListTBDThe remaining numeric refiners that we still need to determine are a mix of whole numbers and decimal numbers. This could imply that we should use either?RefinableInt?or?RefinableDecimal?managed properties. However, because we want to display the refiner values in a list, we can't use either of them. Instead, we have to use?RefinableString?managed properties. It might seem a bit counter-intuitive that we use managed properties that are meant for string values to display numeric refiner values, but this is the only way that we can display refiner values in a list.So, our final list of refiner-enabled managed properties that we want to use looks like this:Refiner to useProperty typeDisplay format for refiner valuesRefiner-enabled managed property?Price?NumberIntervals?RefinableInt01?Brand?Text?ListRefinableString01?Color?Text?ListRefinableString02?Zoom?Number?ListRefinableString03?Screen size?Number?ListRefinableString04?Mega pixels?Number?ListRefinableString05?Max ISO?Number?ListRefinableString06Now that we’ve taken care of all that planning, it's finally time do some configuring.Stage 14: Configure refiners for faceted navigationIn the previous blog posts, we identified the refiners we wanted to use for faceted navigation. We also identified which refiner-enabled managed properties we wanted to use to display these refiners. In this blog post, we'll learn:How to map a crawled property to a refiner-enabled managed propertyHow to initiate a reindexing of the catalogHow to verify that the term set can be used for faceted navigationHow to add refiners to all terms in a term setHow to add refiners to specific terms in a term setBefore you begin, if you need a quick refresh on crawled properties, managed properties and automatically created managed properties, see the blog article?From site column to managed property - What's up with that?Also, in case the length of this post is freaking you out, not to worry. I have used many screenshots, so lots of pictures, and not much text in this post.?Start stage 14How to map a crawled property to a refiner-enabled managed propertyFrom?our planning?, we know that we want to use the following refiner-enabled managed properties for the "Audio" and "Cameras" categories:Refiner to useManaged property namePriceRefinableInt01BrandRefinableString01ColorRefinableString02ZoomRefinableString03Screen sizeRefinableString04Mega pixelsRefinableString05Max ISORefinableString06The procedure to map a crawled property to a refiner-enabled managed property is the same for all the refiners we want to use. In the procedure below, I’ll show you how to do this for the?Price?refiner. More specifically, I’ll show you how to map the crawled property that represents?Price?to theRefinableInt01?managed property.IMPORTANT: Although refiners are displayed on the publishing site, you have to configure them?on the authoring site.Juggling between the different site collections can be a bit confusing. The fact that the UIs look almost identical on both the publishing site and the authoring site doesn't help. So, if you make a mistake the first time you do this, you’re in good company! I made a mistake or two before I learned...Here we go!On your?authoring site, on the?Site Settings?page, click?Search Schema.In the?Managed property?field, type the name of the refiner-enabled managed property to which you want to map a crawled property, and then click the arrow button. In our scenario, we’ll typeRefinableInt01.From the?Property Name?menu, click?Edit/Map Property.On the?Edit Managed Property?page, click?Add a Mapping.In the?Crawled property?selection?dialog box, use the?Search for a crawled property name?field to search for the crawled property that you want to map to this managed property.In our Contoso catalog, the site column that contains the price information is called "RetBasePrice", so enter this in the?Search for a crawled property name?, and then click?Find.Two crawled properties are found:?ows_q_NMBR_RetBasePrice?and?ows_RetBasePrice.If your facial expression is now showing something close to a big question mark, trust me, I understand your confusion. This part is quite tricky. Not only are two crawled properties found (very strange since we only had one "RetBasePrice" site column), but which one should we choose to map to the refinable managed property??OK, let's take a deep breath and take a closer look at what’s going on. In an earlier blog post I talked about the?naming convention for automatically created crawled properties. All automatically created crawled properties will have the name?ows_<something>_SiteColumnName. For the site columnRetBasePrice?in this procedure, the <something> is "q_NMBR". Based on this information,ows_q_NMBR_RetBasePrice?can be identified as an automatically created managed property.I’ll call the other crawled property,?ows_RetBasePrice, a?regular?crawled property.Now here’s the important part: When mapping a crawled property to a refinable managed property, you should select the?regular?crawled property!Select the regular crawled property, and click?OK. In our scenario, we’ll select?ows_RetBasePrice.On the?Edit Managed Property?page, notice that the crawled property?ows_RetBasePrice?has been added to the?Mappings to crawled properties?field.In the?Alias?field, type a name for the refiner. In our scenario, we’ll type?Price.It's important to understand that the alias that you enter here is not the refiner name that will be shown on our publishing site. This alias is meant to make our lives a bit easier when we’re configuring refiners for faceted navigation (I’ll show you how to do this in the procedures below). Remember,? we can't change the name of the refinable managed property, so when doing the configuration, we’ll have to deal with quite a few refinable managed properties that have similar names;?RefinableString01,RefinableString02?etc.? So the alias is a good reminder of what we mapped to the property.To finish the mapping, click?OK.As I stated at the beginning of this procedure, we have to do the mapping for all the refiners that we want to use. So, for the "Audio" and "Cameras" categories I have mapped crawled properties to the RefinableStringXX refinable managed properties, as shown below.?How to initiate a reindexing of the catalogNow that we’ve mapped all the refiner-enabled managed properties that we want to use, we have to initiate a reindexing of the catalog. I showed you how to do this in?Stage 4.Note to Search service application administrators with access to Central Administration: you can do the same thing by?starting a full crawl.??How to verify that the term set can be used for faceted navigationAfter the catalog has been reindexed, we can finally start to do some configuration. But before we start with the actual configuration, let's just verify that we can actually use the term set on the authoring site for faceted navigation.On your?authoring site, go to?Site settings?-->?Term store management.Click to mark the term set, in our scenario this is?Product Hierarchy, and then click the tabIntended Use.Verify that the check box?Use this Term Set for Faceted Navigation?is selected.Because we used the Product Catalog template when we?created our authoring site collection, our Product Hierarchy term set is enabled for faceted navigation by default.If you used a different template when you created your authoring site collection, you will first have to enable the term set for faceted navigation. For information on how to do this, see?Enable a term set for faceted navigation.Now that we have verified that our term set can be used for faceted navigation, let's get on with the configuration.From?our planning, remember that we want to add some refiners to all categories, and other refiners to only a subset of categories. Let's start by adding the refiners that we want to use for all categories:Brand,?Color?and?Price.?How to add refiners to all terms in a term setClick on your term set name. In our Contoso scenario this is?Electronics. Then click the tabFACETED NAVIGATION?and?Customize refiners. This opens a dialog box.In the dialog box, in the?Available refiners?section, scroll down and select?RefinableString01. This is the managed property we want to use for the?Brand?refiner. Notice that sample values are shown (a good sign that we’re on the right path), along with the alias we gave this property when we mapped it to a crawled property.?To add this refiner to the term set, click?Add.This moves the?RefinableString01?property over to the?Selected refiners?section. When a refiner is moved over to the?Selected refiners?section, additional configuration options are shown (I'll get to them in step 7 and 8).Repeat steps 1 - 3 from above to add?RefinableString02?(the?Color?refiner) and?RefinableInt01(the?Price?refiner).To preview our refiners, click?Preview Refiners.So this is starting to look pretty good, however we want to have the?Price?refiner displayed first, and we would also like to change the intervals for the price values. For the?Color?refiner, we want to allow visitors to select multiple refiner values.To move the?Price?refiner up, select?RefinableInt01?(notice the?Alias?name), and click?Move up. Move?RefinableInt01 up in the list until it’s the first property in the?Selected refiners?section.To change the price interval for the?Price?refiner, select?RefinableInt01. From the?Display template?menu, select?Slider with bar graph.? For?Intervals, select?Custom, and enter the price intervals we want to display. Separate each value with a semi-colon.?To enable visitors to select more than one refiner value for the?Color?refiner, selectRefinableString02. From the?Display template?menu, select?Multi-value Refinement Item.Click?Preview refiners?again. Notice that our?Price?refiner now shows our custom intervals, and is displayed with nice looking slider bars. Also our?Color?refiner now has checkboxes that enable you to select multiple refiner values.To save the changes, click?OK?in the dialog box?AND?Save?in the Term Store Management Tool.Now that we have added the refiners that should be applied to all categories, the next step is to add the refiners that could be applied only to a subset of categories.?How to add refiners to specific terms in a term setFrom?our planning, remember that we want to add the refiners?Zoom?and?Screen size?to the?Camerascategory. We also want to add the refiners?Mega pixels?to the?Digital cameras?category, and?Max ISO?to the?Digital SLR cameras?category.When adding refiners to a specific term in a term set, the procedure is identical for all terms. So, to save space, I will only show you how to add the refiners?Zoom?and?Screen size?to the?Cameras?term.Click to select the term to which you want to add category specific refiners. In our scenario, this isCameras. Click the?FACETED NAVIGATION?tab,?Stop inheriting, and?OK?to verify.Click?Customize refiners. This opens a dialog box.To add and customize term-specific refiners, repeat the steps from the previous procedure.In our scenario, we will add the properties?RefinableString03?and?RefinableString04. To verify that our refiners are added correctly, click?Preview refiners.To save the changes, repeat step 10 from the previous procedure?Adding and configuring all the refiners we identified during our planning phase can take some time. The good news is that once we have finished this, it won’t take much work to get the refiners to display on our website.Stage 15: Add refiners for faceted navigation to a publishing siteIn the previous blog posts, we identified and configured the refiners we want to use for faceted navigation. In this blog post we'll learn:How to add a Refinement Web Part to a pageHow to configure a Refinement Web Part to use refiners for faceted navigationHow to change a refiner display nameHow to add counts to refiner values?Start stage 15How to add a Refinement Web Part to a pageBrowse to the page where you want to add the Refinement Web Part (RWP). In our scenario, let's browse to?Cameras.Click the?Settings?menu, and then click?Edit Page.In the Web Part Zone where you want to add the Web Part, click?Add a Web Part.In the?Categories?list, click?Search.In the?Parts?list, click?Refinement, and then click?Add.In our scenario, we'll add a RWP to Zone 2.?When you add the RWP to a page, it will display a couple of default properties such as "Author" and "Modified date". We don’t want to use these refiners. We want to use the refiners we?configured for faceted navigation, so we'll have to configure the Web Part accordingly.?How to configure a Refinement Web Part to use refiners for faceted navigationIn the Web Part, click the?Web Part Menu, and then click?Edit Web Part.In the Web Part tool pane, in the?Refiners?section, select?Use the refinement configuration defined in the Managed navigation term set.Click?OK?and save the page.And just like that, we’ve added refiners to our page. Nice, don't you think?To verify that our refiners actually work, select?Green?and?Orange?from the color refiner, and clickAPPLY.? In an instant, only green and orange cameras display on the page.So, we’ve verified that our refiners work, however, we're not quite there when it comes to user-friendliness. As things stand, the refiners are displayed as?REFINABLEINT01,?REFINABLESTRING01,REFINABLESTRING03?etc. As you might recall, these are the names of the refiner-enabled managed properties we used when we?configured the refiners. To visitors, these names make no sense at all, so we'll have to fix them by changing their refiner display names.??How to change a refiner display nameTo change a refiner display name, you have to modify a JavaScript file in the master page gallery. Because we’ve?mapped our network drive, this is a simple process.In your mapped network drive, go to?Display Templates?-->?Language Files.Go to the folder that that corresponds with the language of your site, which in our scenario is?en-us.Open the?CustomStrings.js?file.For each refiner-enabled managed property that you want to change the display name of, use the following syntax:"rf_RefinementTitle_ManagedPropertyName": "Sample Refinement Title for ManagedPropertyName",For example, in our Contoso scenario, the refiner-enabled managed property?RefinableInt01?contains aPrice?refiner. To give this refiner a nice display name, we'll add the following line to the java script file:"rf_RefinementTitle_RefinableInt01": "Price",In our Contoso scenario, for the refiners we have configured for the "Audio" and "Cameras" category, our CustomString.js file will look like this:?Save this file, and refresh the?Cameras?page to verify that our refiners now have nice, user-friendly display names.If we browse to the?Digital cameras?category, we can see that the category-specific refiner?MEGA PIXELS?is displayed.So, our category-specific refiners now display for the correct category, and they all have user-friendly names. However, there is another small detail that would make our refiners even better.? Right now we can't see any numeric details for the refiner values. For example, we can't see how many cameras are of the color?Silver, or how many cameras have?14?mega pixels. To see this information, we need to addcounts?to the refiner values.?How to add counts to refiner valuesIn your mapped network drive, go to?Display Templates?-->?Filters.Open the HTML file?Filter_Default.Change the value for?ShowCounts?to?true.Save the file, and refresh the?Cameras?page to verify that refiner counts are displayed. You’ll see that refiner counts only display for refiners where it’s only possible to select one refiner at a time.To add refiner counts to refiners where it’s possible to select multiple refiner values, open the HTML file?Filer_MultiValue, and repeat steps 3 and 4.Now when we refresh the?Cameras?page, all of the refiner values have counts. Nice!?So, when visitors come to our Contoso site, they can use category-specific refiners to easily find the product they’re looking for. But there’s still one more thing missing: when visitors are on a top level category page, for example?Cameras, they can't easily see which subcategories are under?Cameras. Luckily, there is a Web Part that will take care of this for us. I will show you how to add this Web Part in the next -- and last -- blog post of this series.Stage 16: Add a Taxonomy Refinement Panel Web Part to a publishing siteIn the previous blog post, I showed you?how to add refiners for faceted navigation to a publishing site.? By using category-specific refiners, visitors can easily find the product they are looking for. However, visitors can't easily see the different subcategories within a particular category.In this blog post we'll learn:How to add a Taxonomy Refinement Panel Web Part to a pageAbout the Taxonomy Refinement Panel Web Part?Start stage 16Throughout this series, whenever I have introduced a new feature, I have started by explaining the feature, and then showed you how to configure it. In this post I will flip the sequence, as it will be easier to explain what’s going on by using screenshots of the Web Part.How to add a Taxonomy Refinement Panel Web Part to a pageBrowse to the page where you want to add the Web Part. In our scenario, let's browse to "Cameras".Click the?Settings?menu, and then click?Edit Page.In the Web Part Zone where you want to add the Web Part, click?Add a Web Part.In the?Categories?list, click?Search.In the?Parts?list, click?Taxonomy Refinement Panel, and then click?Add.Save the page.That’s all there is to it! Without having to do any configuration, the sub-categories under "Cameras" are displayed. Also notice that refiner counts are automatically displayed.If we browse to "Audio", the Audio subcategories are displayed with counts.Now let me explain how these sub-categories are able to "magically" appear.?About the Taxonomy Refinement Panel Web PartLet's start with a definition of this Web Part: The Taxonomy Refinement Panel Web Part filters search results from an associated Search Web Part, which show refiners based on the current navigation term.For example, in our case the Web Part showed the sub-categories of “Audio” and sub-categories of “Computer”.For the Taxonomy Refinement Web Part to work correctly, there are two conditions that have to be taken into account:?The Taxonomy Refinement Web Part must be associated with another Search Web Part on the page that it is added to.The Taxonomy Refinement Web Part must be associated with the managed property that represents the managed navigation of the site.At this point in the series, you probably understood this, but just in case you didn’t, let me explain it in the context of our Contoso scenario.Let's start with the first condition.Unlike the Content Search Web Part, the Taxonomy Refinement Web Part doesn’t contain a query. Because it doesn't query for content, it needs to receive search results from elsewhere to display content.In the screenshot below, the Taxonomy Refinement Panel Web Part is shown in the default edit mode. In the Web Part Tool Pane, in the?Query?section,?Refinement Target?is set to?Content Search - Default.?This configuration means that search results returned by the Content Search Web Part will be used as input by the Taxonomy Refinement Panel Web Part.Check it out: first condition accomplished!Now for the second condition: The Taxonomy Refinement Web Part must be associated with the managed property that represents the managed navigation of the site.Remember that:Managed navigation is site navigation as defined by a term set.The term set is mapped to a site column.During crawl, the site column is represented as a managed property.In?the Taxonomy Refinement Panel Web Part tool pane, in the?Query?section,?Refiner?is set toowstaxIdProductCatalogItemCategory.Explaining?owstaxIdProductCatalogItemCategory?requires a bit of back-tracking, but try to bear with me on this.? Here we go:owstaxIdProductCatalogItemCategory?is the?managed property name?of the?Item Category?site column.The?Item Category?site column is?associated with the?Product Hierarchy?term set.The?Product Hierarchy term?is?integrated into the?Site Navigation?term set.The?Site Navigation?term set is set to drive managed navigation?on our Contoso site.?Check it out, second condition accomplished!So, let's summarize:A visitor browses to "Cameras".The CSWP on the category page automatically issues a query for catalog items that are tagged with "Cameras" or any children of "Cameras", and displays this in the Web Part.The Taxonomy Refinement Panel Web Part uses the search result from the CSWP.? Instead of displaying individual catalog items, it displays the categories to which the search results belong as refiner values, for example "Digital cameras" or "Camcorders."So that’s pretty cool, but what makes the Taxonomy Refinement Panel Web Part even cooler, is that it accounts for previous queries or refinements that a visitor might have made when showing its refiners.For example, on our Contoso site, if a visitor browses to "Cameras" and selects?Fabrikam?as the BRAND refiner, the Taxonomy Refinement Panel Web Part takes this refiner selection into account when displaying its refiner values.To visitors, this makes browsing for products really convenient, because they can immediately see which sub-categories have?Fabrikam?camera products, without having to click back and forth.?So, that was all for this series.?If you are setting up your own site, I hope you will make good use of some of the features I have described. ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- before you begin
- part 1 introduction temple mis
- sharepoint 15 app model introduction
- powershell illinois institute of technology
- remnux usage tips for malware analysis on linux cheat sheet
- user manual templates manager for sharepoint
- powershell study notes amr eldib
- introduction to essentials 2007
- unit 4 lecture notes sharepoint file structures
Related searches
- swkey sharepoint log in
- southwest key programs sharepoint employee
- model theory an introduction pdf
- sharepoint rss feed not working
- sharepoint red cross
- sharepoint content type examples
- what are sharepoint content types
- sharepoint content type document template
- sharepoint 2013 content types list
- sharepoint create content type
- sharepoint site content types explained
- sharepoint create new content type