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
The code should look something like this.
this.Cmssearchresults1.Path = DropDownList1.SelectedItem.Text.ToString();See also: Applies to:
Kentico CMS 3.1a