Changing the SmallSearchInputBox delegate control

A colleague of mine was wanting to make some changes to the SmallSearchInputBox delegate control in SharePoint 2007. That’s the control that appears on most pages, looking like:

This control is a ‘Delegate control’ – that is, you can create features to override the currently used control. What my colleague wanted to do was not display the ‘Scope’ drop down list, the Advanced Search link, and to include prompt text (something like ‘Enter Search…’). A quick dig into the FEATURES folder in 12 Hive showed that the control had a number of properties.
(The features that this information applies to are the OSearchBasicFeature and OSearchEnhancedFeature. Both contain files called ‘SearchArea.xml’, and that contains the code below. I found the folders with this in:
%12 Hive%\Template\Features\OSearchBasicFeature
%12 Hive%\Template\Features\OSearchEnhancedFeature )


This shows a property ShowAdvancedSearch which sounded pretty promising for turning off the Advanced Search link. We decided to see what other properties were available, and found a good article by Clint Cherry about the SmallSearchInputBox control, and the MSDN docs. The Property tags in the XML for the delegate control set the properties of the web control class – e.g. GoImageUrl matches the GoImageUrl property on the class. Much to our pleasure, we found the QueryPromptString displays text in the search control which vanishes when it receives focus, and the DropDownMode property allows us to turn off the scope dropdown list. Hurrah!
For the values that you can set the drop down mode to, see the MSDN docs again


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s