Search SharePoint from the IE 7 Toolbar

Here is an easy way to search a SharePoint site from the IE toolbar without having to develop an add-in. 

Microsoft implemented open search in IE 7.  Here's how it works: when a user browses to your site, the search provider drop down lights up.  If they click the drop down, they will see your custom search provider that they can add temporarily or permanently to their list of search providers.  Here's an example:

To temporarily use your custom search provider, the user simply selects the menu item and the search box will change (note that the yellow star indicates the search provider is temporary).  For example:

To permanently add your custom search provider, the user selects Add Search Providers and selects it:

The following dialog appears:

After that, your custom search provider will remain in the list (note there is no yellow star, indicating when the user navigates away from your site, the search provider will remain).

When the users searches from the search box, they are taken to the SharePoint search results page.

Here's how to implement it.

Place the following tag in the home page of your site.  You can put it anywhere in the page (but put it in the <head> element if possible).

<link title="SharePoint Search" type="application/opensearchdescription+xml" rel="search" href="SharePointSearchProvider.xml" />

Then create an XML file using the following code and upload it to a url that matches the href attribute in the link tag.

 <?xml version="1.0" encoding="UTF-8"?>
 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
   <ShortName>SharePoint Search</ShortName>
   <Description>Search SharePoint from Internet Explorer</Description>
   <Tags>SharePoint Search</Tags>
   <Contact>john@johnwpowell.com</Contact>
   <Url type="text/html"
        template="http://yoursharepoint.com/searchcenter/Pages/Results.aspx?k={searchTerms}"/>
 </OpenSearchDescription>

You can see that open search is simply passing the search term to the SharePoint search results page using the k (keyword) parameter.  There is a special token {searchTerms} that will be replaced with the text the user types in the search box.

I'll leave it you how you want to deploy the xml file and insert the link element into the page.  One simple approach is to upload the XML file to a document library and use a content editor web part for the link tag. 

Here are the full specifications for open search: http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document

 

Leave a Reply


Search SharePoint from the IE 7 Toolbar

Here is an easy way to search a SharePoint site from the IE toolbar without having to develop an add-in. 

Microsoft implemented open search in IE 7.  Here's how it works: when a user browses to your site, the search provider drop down lights up.  If they click the drop down, they will see your custom search provider that they can add temporarily or permanently to their list of search providers.  Here's an example:

To temporarily use your custom search provider, the user simply selects the menu item and the search box will change (note that the yellow star indicates the search provider is temporary).  For example:

To permanently add your custom search provider, the user selects Add Search Providers and selects it:

The following dialog appears:

After that, your custom search provider will remain in the list (note there is no yellow star, indicating when the user navigates away from your site, the search provider will remain).

When the users searches from the search box, they are taken to the SharePoint search results page.

Here's how to implement it.

Place the following tag in the home page of your site.  You can put it anywhere in the page (but put it in the <head> element if possible).

<link title="SharePoint Search" type="application/opensearchdescription+xml" rel="search" href="SharePointSearchProvider.xml" />

Then create an XML file using the following code and upload it to a url that matches the href attribute in the link tag.

 <?xml version="1.0" encoding="UTF-8"?>
 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
   <ShortName>SharePoint Search</ShortName>
   <Description>Search SharePoint from Internet Explorer</Description>
   <Tags>SharePoint Search</Tags>
   <Contact>john@johnwpowell.com</Contact>
   <Url type="text/html"
        template="http://yoursharepoint.com/searchcenter/Pages/Results.aspx?k={searchTerms}"/>
 </OpenSearchDescription>

You can see that open search is simply passing the search term to the SharePoint search results page using the k (keyword) parameter.  There is a special token {searchTerms} that will be replaced with the text the user types in the search box.

I'll leave it you how you want to deploy the xml file and insert the link element into the page.  One simple approach is to upload the XML file to a document library and use a content editor web part for the link tag. 

Here are the full specifications for open search: http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document

 

Leave a Reply