<asp:ContentPlaceHolder id=”PlaceHolderSearchArea” runat=”server”>
<SharePoint:DelegateControl runat=”server” ControlId=”SmallSearchInputBox” />
This control is actually available through a feature called “OSearchBasicFeature” located under 12\TEMPLATE\FEATURES. In the feature elements file (in this feature it’s called “SearchArea.xml”), you can see the following:
ControlAssembly=“Microsoft.SharePoint.Portal, Version=188.8.131.52, Culture=neutral, PublicKeyToken=71e9bce111e9429c“>
The main class here seems to be Microsoft.SharePoint.Portal.WebControls.SearchBoxEx. To customize small search, you need to inherit from “SearchBoxEx” class and override “CreateChildControls” method to get your custom small search rendered. Do not modify any out of the box files as they might lead you into an unsupported scenario. Instead, following are the simple steps to get the small search control customized:
- Create a custom master page by copying the default.master page. I haven’t tested with minimal master as explained here but I am guessing that would work either.
- Copy/Paste “OSearchBasicFeature” in the same feature folder with a different name (like mySimpleSearch).
- Change the feature ID in the feature.xml file within mySimplerSearch feature.
- Change the control ID in the SearchArea.xml file to something like “mySimleSearchcontrol”.
- Change the class & assembly referenced in the SearchArea.xml file to the control library you created above.
- Install & Activate this feature,
- Render the custom control you created in the custom master page have and remove “SmallSearchInputBox” control from the master page.
This should do the tricky and you should be able to literally customizing anything within the small search control.
Happy customizing your SharePoint environment – and I really hope this post was helpful! Look around for things like this in SharePoint as there are plenty of “hacks” to get things done!!!