This is a blog post 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 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:
Start stage 16
Throughout 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 page
Browse to the page where you want to add the Web Part. In our scenario, let's browse to "Cameras".
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 Part
Let'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:
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.
In the Taxonomy Refinement Panel Web Part tool pane, in the Query section, Refiner is set to owstaxIdProductCatalogItemCategory.
Explaining owstaxIdProductCatalogItemCategory requires a bit of back-tracking, but try to bear with me on this. Here we go:
Check it out, second condition accomplished!
So, let's summarize:
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.