UserEsp
UserEsp

Reputation: 426

How to add smart search dialog by code in kentico and add an index?

I'm trying to add the code like this

<cms:SearchDialog ID="SearchDialog" runat="server" />

in a master page but seems like that's for SQL search dialog and I want to use the smart search dialog for the add a page crawler index also by code.

Upvotes: 0

Views: 58

Answers (1)

Brenden Kehren
Brenden Kehren

Reputation: 6117

Typically the search box you have on the master page is a simple redirect to the /search page with url parameters along with it. For example, you'd have a textbox with a button and some javascript to perform the redirect which could have a URL like this:

/search?searchtext=the+big+lazy+dog&searchmode=allwords

No need to complicate search any more than it already is. Just make sure on your search page you have the search results web part on the page which will automatically pick up the url parameters.

Upvotes: 1

Related Questions