Configure managed navigation in SharePoint 2013 step by step

Gain the benefits of Managed Metadata and Search for dynamic navigation

Agnes Molnar

by Agnes Molnar on 3/20/2014

Share this:
Print

Article Details

Date Revised:
4/22/2014

[IF condition="s1.Length > 0" strings="Managed MetadataMicrosoft SharePoint SearchSharePoint 2013spxUI"]

Applies to:
Managed Metadata, Microsoft SharePoint , Search, SharePoint 2013, spx, UI

[ENDIF]

http://itunity.com/c/bG


In SharePoint 2013, one can create dynamic metadata navigation, using the benefits of both Managed Metadata and Search. The result is dynamic navigation that is built in through a taxonomy that shows the current search results filtered by the current node (with or without children, depending on the current configuration). Figure 1 shows an example.

catalog

Figure 1: Sample navigation

Expected Behavior

1. Navigation has to be dynamic, that is, when one adds a new term to the term store, it has to be displayed on the navigation (and has to work) immediately.    

On the target page, search results have to be displayed, filtered by the selected navigation item. (Note: As the results or items are provided by search, they are refreshed by each full or incremental crawl.)

2. A configuration parameter is expected. The parameter defines whether only the exact matches will be displayed, OR whether the matches for the children of the selected navigation item will also be included. (For example, when one selects "Germany" above, the configuration parameter determines whether the values for "Berlin", "Frankfurt" and "Munich" will also be displayed.)

Steps to achieve this behavior in SharePoint 2013

  1. Preparation (creating a site and a target page)
  2. Configuration of Managed metadata (Term Set)
  3. Configuration of Search
  4. Configuration of Site navigation settings
  5. Insertion and customization of Content Search web part

Implementation

Preparation: Create a page that will be the target page later. You will need to reference this page in the following steps:

  1. Create a site where you want to use the metadata navigation. For example, \catalog.
  2. Create a target page, where you'll add the appropriate ContentSearch web part later. Leave it empty for now.
  3. Save the page with a name like /catalog/SitePages/Home.aspx

Term Set: As always, you need to create TermSet, but with some special settings in this case.

  1. On the tab, "Intended Use," you need to enable the following checkboxes:
    • "Available for Tagging"
    • "Use this Term Set for Site Navigation"
  2. Term Driven Pages: Enter the path of the page you created in the previous step--e.g., /catalog/SitePages/Home.aspx--or select with the Browse button

Search configuration:

  1. Create the appropriate content source or sources
  2. Make sure you have created a ManagedProperty for your Managed Metadata, with the settings: Queryable, Retrievable, and Refinable enabled. Note its name; in my demo the name is DemoLocation.
  3. Run a Full Crawl

Next, you have to edit the site's settings created in the first step (/catalog) in order to enable Metadata Navigation. In my example it's enabled for the Top Navigation, but you can enable it for Quick Launch, as well.

  1. Go to the Site Settings, and open Navigation (which you'll find in the group "Look and Feel").
  2. For "Global Navigation," select "Managed Navigation," as you can see in Figure 2.

fig2

Figure 2:  Select Managed Navigation

3. Select the appropriate Term Set, as shown in Figure 3

term

Figure 3: Select the Term Set

4. Select both check boxes in Managed Navigation: Default Page Settings:

  • Add New pages to navigation automatically
  • Create friendly URLs for new pages automatically

5. Save your settings

As a result, you should see the Managed Navigation now, without showing any results, of course. The URLs will appear as friendly, like the following: demo2013.aghy.hu/catalog/SitePages/Home.aspx#/europe/germany/berlin

The next and last step here is to add the appropriate ContentSearch Web Part to your target page:

  1. Edit your page and click on Add New Web Part.
  2. Select Content Rollup/Content Search Web Part, and click Add.
  3. In the Select Query dropdown, select the Result Source you want to use.
  4. In the Property Filter, select your Managed Property (which you created for your Term Set, earlier). If you cannot see your Managed Property, click Show All Managed Properties first. Select Contains and Site navigation Terms of current pages and subpages.
  5. Click Add property filter.

Save your settings. Now the appropriate search results will be displayed.

Note that by default, the display of results is very ugly here. To create a better look and feel, you can play with the Display Templates. In my demo, I use the following additional settings of the Content Search Web Part:

  1. Properties/Display Templates/Item: Two lines
  2. Uncheck the check box that says, Don't show anything when there are no results
  3. Properties/Property Mappings/Change the mapping of managed properties
  • Link URL: Path
  • Line 1: Title
  • Line 2: Path

Of course, you can achieve some advanced formatting, creating your custom Display Template the Item.


Topic: Content Management

Sign in with

Or register