kwizcom banner advertisement

Hide Contextual Search Scope from Search Dropdown

Requirement: Hide the contextual "This Site: Site Name" search scope from Search drop down.

Solution:
1. Copy the folder OSearchEnhancedFeature from "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\OSearchEnhancedFeature" as "OSearchNoContextScope"

2. Delete the SearchAdminLinks.xml file inside OSearchNoContextScope and remove the reference <ElementManifest Location="searchadminlinks.xml"/>  from Feature.xml

3. Edit the Feature.xml file, Change the Feature GUID, Feature Title, description.

4. Add <Property Name="DropDownMode">ShowDD_NoContextual</Property> in SearchArea.xml. Move the <Property Name="UseSiteDefaults">true</Property> next to it.

4. Build and Create a WSP. Deploy & activate the feature "Hide Contextual Search Scope Dropdown items" to see it in action!
Project structure
 
Before:

After:
Hide Contextual Search Scope from Search Dropdown Hide Contextual Search Scope from Search Dropdown Reviewed by Salaudeen Rajack on 4:47 PM Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.