Share via


Light Up IE7 With SharePoint Search

Did you know you can advertise your SharePoint Server's search capabilities to IE7?

Browsing our internal intranet portal the other day (SharePoint 2007 of course!) I noticed how the IE7 search dropdown glowed orange when in the Search Center.  Opening the dropdown shows three search providers are being advertised.  A user can then add these using the Add Search Providers menu option so that they are permanently available from the IE7 search box.

So just how do you get IE7 to light-up in this way?  Paul Holdaway, a fellow consultant here, gave me the answer.  A HTML link element on the page provides a reference to an XML file:  

<link title="Intranet Search on MSW" type="application/opensearchdescription+xml" rel="search" href="https://myportal/mypath/MSWIntranet.xml" />

The XML file contains an OpenSearch definition and looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="https://a9.com/-/spec/opensearch/1.1/">
<ShortName>Intranet - MSW</ShortName>
<Description>MSW Intranet Search</Description>
<Url type="text/html"
template=https://myportal/searchcenter/pages/results.aspx?k={searchTerms}
/>
<SyndicationRight>open</SyndicationRight>
</OpenSearchDescription>

A neat little solution don't you think?

Technorati tags: SharePoint, IE7, OpenSearch

Comments

  • Anonymous
    December 13, 2006
    You can create an HTML link that calls this script action: window.external.AddSearchProvider("http://...myfile.xml") (The XML contains the search provider definitions) This will show the user a dialog, allowing him to add this search provider and set it as default.