Refinements panel and Custom Search Box web parts

So I’m doing some work for a customer where they want a custom Search Box web part. Essentially, they want to be able to search by particular managed properties, which is a pretty common scenario:

CaptureNaturally, I added this to my search results page, and removed the existing Search Box web part.

During test, the customer noticed that the ‘Show More’ links on the refinement panel had stopped working:

Capture2Interesting – although showing some different metadata properties, this was all pretty standard stuff. A bit of a check on Google found this interesting post by Chris Coulson. The short if it is that the Refinements panel uses JavaScript that is loaded by the Search Box web part – so you have to have a Search Box web part on the results page, even if it is hidden. Add that and the Refinement panel works again.

You can hide the web part via the web part properties > Layout > Hidden.

Advertisement
Refinements panel and Custom Search Box web parts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.