How to: Customize the Title and Branding Icon for Federated Search Results
If the source of a federated location is the Local Search Index, a Federated Results Web Part connected to that location shows the title of the Local Search Index in its title bar above the results. If the source is an OpenSearch location, the title bar shows the title from the OpenSearch XML feed.
By changing the XSL property of the Federated Results Web Part, you can modify what appears in the title bar for an OpenSearch results set. You can do the following:
Modify the title that is shown for an OpenSearch result.
Add a branding image to the title bar.
Note
The federated search Web Parts on the default results page are configured to use the Internet Search Results and the Internet Search Suggestions locations. The following XSLT code does not work as expected for the default configuration for these locations.
To customize the title of a federated search results set
On the Search Administration page, click Federated Locations.
Under Location Display Name, click the name of your location.
Expand the Display Information node.
Under Federated Search Results Metadata, clear the Use Default Formatting check box.
Click the ellipsis (…) button to open the Text Entry window for the location's XSL property.
Locate the following tag in the XSLT.
<xsl:value-of select="$ChannelTitle"/>
Modify the select value for the tag by doing one of the following.
To use the Web Part title (the title value that is set in the Web Part's properties), modify the select value as shown.
<xsl:value-of select="$WebpartTitle"/>
To customize the title text, modify the select value as shown.
<xsl:value-of select="Your title text"/>
Click OK to close the Text Entry window.
On the Edit Federated Location page, click OK to save the changes to the federated location.
The Federated Results Web Part shows the customized title.
Execute a query that returns results from the location. Verify that the new title appears as you expect.
To add a branding image to the title of a federated search results set
On the Search Administration page, click Federated Locations.
Under Location Display Name, click the name of your location.
Expand the Display Information node.
Under Federated Search Results Metadata, clear the Use Default Formatting check box.
Click the ellipsis (…) button to open the Text Entry window for the location's XSL property.
Locate the following tag in the XSLT.
<xsl:param name="BrandingIcon"></xsl:param>
Add the URL to the image you want to use to the xsl parameter tag for the BrandingIcon parameter.
<xsl:param name="BrandingIcon">URL to image</xsl:param>
Note
Ensure that this image is sized to display appropriately next to the title of the federated search results set. We recommend a .gif file or .png file that is 16 pixels by 16 pixels.
Click OK to close the Text Entry window.
On the Edit Federated Location page, click OK to save the changes to the federated location.
The customized branding image appears in the title bar of the Federated Results Web Part.
Execute a query that returns results from the location. Verify that the new title appears as you expect.
Note
If you update the federated location's XSL property, you must ensure that the Federated Results Web Part is configured to use the location's display information.
To configure the Federated Results Web Part to use the location's display information
In your browser, navigate to the results page URL. For example,
http://
ServerName/results.aspx
.Click the Site Actions link, and then click Edit Page.
In the Federated Results Web Part instance you want to modify, click the edit arrow to display the Web Part menu, and then click Modify Shared Web Part.
In the Federated Results Web Part tool pane, click the Display Properties arrow.
Select Use Location Visualization.
Click OK to update the Federated Results Web Part instance.
See Also
Other Resources
How to: View Search Results XML Data
How to: View and Edit the Search Results XSLT Transformation
Customizing Search Results