问题
On every new SharePoint 2010 site you get the default search box (In the MasterPage) that allows you to just do a normal search.
I would like to replace this with some item that will allow you to pick Advanced or People Search, something like this.........
Is it possible to replace/alter the default search box in the MasterPage?
回答1:
The search box is a so called delegate control, so it is not that easy to customize as you would have to overwrite the control with your own to change it. There are some advanced settings (ShowAdvancedSearch
property) you can activate for the search box, but that's about it.
So about your question: Yes it is possible to replace the default search box, but you would have to write your own searchbox then. You should try googling for "SmallSearchInputBox". Here some articles to get you started:
- Add Custom Search box in SharePoint 2010
- Searchbox [SmallSearchInputBox] customization
- Customize search box in sharepoint 2007
- Changing the SmallSearchInputBox delegate control
来源:https://stackoverflow.com/questions/3931979/replace-default-search-box-in-sharepoint-2010-with-custom-one