Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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