All About SharePoint

Liedong(Ken) Zheng,SharePoint Leader at SIMPLOT

Removing contextual: This sites cope from simple search box

Posted by ken zheng on October 23, 2008

Microsoft Office SharePoint Server 2007 provides two categories of search scopes: Custom and Contextual.

*
Custom scopes:
o
“All Sites”
o
“People”
o
The custom search scopes created via the search or site admin pages
*
Contextual scopes:
o
“This Site”
o
“This List”
Mark has posted a blog explain these 2 types.

If you want to remove the “This site” contextual scope all together, then this cannot be done using standard user interface. You need to create a new feature based on one of the existing ones. The sample below replaces the collaboration portal search box with a delegate without the “This site” contextual scopes.

1.
Make a copy the existing feature OSearchEnhancedFeature (MOSS Enterprise ed.)
2.
Change the sequence number to fit below 25, e.g.

3. Add the DropDownMode property

ShowDD_NoContextual

All you need to do now is to package the feature in solution and deploy it. You can do it manually, or use something like the WSPBuilder

About these ads

2 Responses to “Removing contextual: This sites cope from simple search box”

  1. bob e said

    Good idea my friend

  2. This works – Thanks so much!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 28 other followers

%d bloggers like this: