How to customize the search web part to use a custom scope

   —   
This article describes how to change the cmssearchresults web part to enable searching in different sections of the site.
You can create own web part with custom code behind. You may clone the web part ~\CMSWebParts\Search\cmssearchresults.ascx.cs.
Let’s say, we have a dropdown menu with different search scopes. The user selects a search scope. Every selection is a path within the site. Now we need to update the this.Cmssearchresults1.Path property.

The code should look something like this.

this.Cmssearchresults1.Path = DropDownList1.SelectedItem.Text.ToString();

See also:

Applies to: Kentico CMS 3.1a
Share this article on   LinkedIn

Juraj Ondrus

Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.