How do I output the UNC path for the file system-based search results?

You can output the UNC path for the file system collection by making an edit to the default.xsl within the /searchblox/stylesheets/ folder.

1. Identify the following code block in 2 places within the default.xsl file:

<xsl:otherwise>
<xsl:variable name="fileurl"
select="concat('FileServlet?url=', encode:encode(url))" />
<xsl:variable name="fileurlcol" select="concat($fileurl, '&amp;col=')" />
<xsl:variable name="fileurlcolid" select="concat($fileurlcol, col)" />
 
<tr>
<td width="50%" class="link">
<a href="{$fileurlcolid}">
<xsl:apply-templates select="title" />
</a>
</td>
<td class="relevance">
<xsl:value-of select="score" />
%
</td>
</tr>
</xsl:otherwise>
 
2.) Replace with the following code block:
 
<xsl:otherwise>
 
<tr>
<td width="50%" class="link">
<a href=“{url}">
<xsl:apply-templates select="title" />
</a>
</td>
<td class="relevance">
<xsl:value-of select="score" />
%
</td>
</tr>
</xsl:otherwise>
Have more questions? Submit a request

Comments