0

I am working on a custom SharePoint 2010 solution, and we have an interesting problem.

Is it possible to customize the Delegate Control (using the SmallSearchInputBox) to default to a scope (let's use "All Sites" in this case) AND set the custom search result page to one of our custom pages?

Keep in mind that we do not want contextual search at any point, but we do want to always use the given scope, regardless of where the user searches from.

We have investigated doing this through the Site Collection Search settings, to no avail, unless there is some setting that we are missing.

It feels like a normal request, but maybe I'm just missing something.

Thanks

1 Answer 1

2

Yes, this is possible. You'll have to write your own Feature with a delegate control in it, but that's pretty simple. You can use something like the OSearchBasicFeature as a template. The properties you need to set should be something like:

<Control Id="SmallSearchInputBox" Sequence="25" ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Property Name="DropDownMode">ShowDD</Property>
<Property Name="SearchResultPageURL">/URLToSearch/customresults.aspx</Property>
</Control>

Note: this is for a SP2007 solution

I'm surprised that you can't get the Site Collection settings to work. You could point all searches to a custom results page - though this won't set the scope for you. You can do that within the custom results page though - the search core results web part has a 'scope' setting. I think it's under 'Miscellaneous'. That matches what I think you are trying to do a bit better...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.