Tuesday, August 4, 2009

Changing sharePoint default search scope - without modifying OOB file

Previously I posted about changing search scope in Search drop down. But that solution requires modifying OOB xml file (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\OSearchEnhancedFeature\ SearchArea.xml), which is not recommended.

So I decided to investigate an laternate Microsoft recomended way and I got one.

What I did was copied whole feature folder "OSearchEnhancedFeature" and named the new folder "OSearchEnhancedFeatureCustom".
Then I added this line to SearchArea.xml in the new folder "OSearchEnhancedFeatureCustom".
<property name="DropDownMode">ShowDD_DefaultContextual</property>

Also don't forget to remove all CustomActions from file "searchadminlinks.xml" otherwise you will have duplicate links for Search options on Site Settings page.

This feature will get installed at Web Application level and you can activate it only for the web applications you need to.

Thanks.

No comments:

Post a Comment