Add View folder link for document search results

In the default document search results it is only possible to open the documents. It is not possible to navigate to the documents location.


1. Edit the Search Core Results Web part on the Search Center results page.
2. Click on XSL Editor under Display properties.
4. In the XSLT look for the following code.

<xsl:template name="ViewInBrowser">
        <xsl:param name="browserlink" />
        <xsl:param name="currentId" />
        <xsl:if test="string-length($browserlink) &gt; 0">
            <span class="srch-urllink">
                <a href="{$browserlink}" id="{concat($currentId,'_VBlink')}">
                    <xsl:value-of select="$ViewInBrowser" />

3. Add the following code after the code for ViewInBrowser.

<!-- Toon View Folder link bij documenten -->    
<xsl:if test="isdocument = 'True'">
    <xsl:attribute name="href">
      <xsl:value-of select="sitename"/>
    View Folder

4. Save the changes and  enjoy the result.



One Reply to “Add View folder link for document search results”

  1. Thanks for this. Though I had to place the View Folder code in a different location as my environment doesn’t have Office Web Apps installed.
    After this code:
    <!– When there is keywory to issue the search –>
    <xsl:template name="dvt_1.noKeyword">
    <span class="srch-description2">
    <xsl:when test="$IsFixedQuery">
    <xsl:value-of select="$NoFixedQuery" />
    <xsl:value-of select="$NoKeyword" />
    Paste View Folder code.
    Thanks for the Mod.

Leave a Reply

Your email address will not be published. Required fields are marked *