A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Wednesday, November 21, 2012

Customizing Google News Search Connector For SharePoint

Have you ever used Google News Search Connector for SharePoint? It allows you to search Google News from within SharePoint. If you haven’t done it before and would like to learn how to do it, read following article on my site:

Working With SharePoint 2010 Search  - Part 2

By default, Google News are shown on the right side of your page as shown below:

Suppose we want to show Google News in the center, can we do that? Yes, we can. All you need to do is modify the XSLT and you are done. Let me show you how.

1.       Go to Central Administration site

2.       Click General Application Settings

3.       Click Farm Search Administration

4.       Click Search Service Application Name

5.       Click Federated Locations on the left

6.       Click Google News to open it.

7.       Expand Display Information Node.

8.       In Federated Search Results Display Metadata section, click ellipsis to edit the XSL. For you convenience, you can copy the XSL to a better editor like Notepad or Visual Studio (if you want to see XSL in colors and with better formatting).

9.       Search for “ms-searchsummarymain” class name and remove it. You will find it immediately below the “Google News Results” headline.

/><xsl:variable name="ChannelTitle">

               Google News Results

           </xsl:variable><xsl:if test="($RowCount &gt; 0)"><div class=”ms-searchsummarymain” xmlns="">

Just leave the class name empty (class=””).

10.   Immediately after this line, you will find following line:

<div class=”ms-searchChannelTitle”>

Remove the class name. Your DIV tag should look like this:

<div class=””>

11.Locate following line:


<span class=”ms-searchChannelTitle”>


Remove class name. Final tag should look like the following:

<span class=””>

12.Search for “ms-searchsummary” and remove it.

Before the change, tag will look like this:

<xsl:with-param name="StyleClassPrefix" select="string(‘ms-searchsummary’)" />

After the change, tag will look like this:

<xsl:with-param name="StyleClassPrefix" select="string(‘’)" />

“ms-searchsummary” appears twice in the XSL. You have to remove it from the second location as well. Search again and modify the tag by removing it.

Before: <xsl:with-param name="StyleClassPrefix" select="string(‘ms-searchsummary’)" />

After: <xsl:with-param name="StyleClassPrefix" select="string(‘’)" />

13.Search for following tag:

<xsl:value-of select="$ShortLink" /></a></div>

After </div> add breaks. Final tag will look like this:

<xsl:value-of select="$ShortLink" /></a></div><BR/><BR/>

14.Save the changes. Go to SharePoint site and run search again, now you will see Google Search results in the center.


Download completed XSLT (TXT format) from here.