Pages

Monday, 26 August 2013

Change the display name of a refiner in SharePoint 2013 Search Refinement Web Part.

By default, the name of the managed property will be used as a display name for the refiner. In many cases, the managed property name is hard to understand — for example, RefinableString00 or ColorOWSTEXT. You can fix this by changing the name of the refiner in a JavaScript file.
  1. On the page that contains the Refinement Web Part, on the Settings menu, click Site Settings.
  2. On the Site Settings page, in the Web Designer Galleries section, click Master pages and page layouts.
  3. On the Master Page Gallery page, click Display Templates.
  4. On the Display Templates page, click Language Files.
  5. On the Language Files page, click the folder for the relevant language.
  6. Open the CustomStrings.js file.


 Add one line for each managed property that you want to change the display name for. Use this syntax: 

"rf_RefinementTitle_ManagedPropertyName": "Sample Refinement Title for ManagedPropertyName"
For example, add this line to change the display name for the managed property RefinableInt00 to Price:

"rf_RefinementTitle_RefinableInt00": "Price".

  1. Save the file.

Next Post , I will discuss about, how to achieve this using power shell.

1 comment:

  1. Funny solution, but how would you solve that problem on a multilingual farm?

    ReplyDelete