If no extension, search will give default IE Icon.
Just find this code in the XSL for the core result webpart:
Code Block
<!-- This template is called for each result -->
<xsl:template match="Result">
<xsl:variable name="id" select="id"/>
<xsl:variable name="url" select="url"/>
<span class="srch-Icon">
<a href="{$url}" id="{concat('CSR_IMG_',$id)}" title="{$url}">
<img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
</a>
</span>
Add
Code Block
<xsl:variable name="isdoc" select="isdocument"/>
After
Code Block
<xsl:variable name="id" select="id"/>
<xsl:variable name="url" select="url"/>
and replace
Code Block
<img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
by
Code Block
<xsl:if test="$isdoc = 0">
<img align="absmiddle" src="/_layouts/images/folder.gif" border="0" alt="{imageurl/@imageurldescription}" />
</xsl:if>
<xsl:if test="$isdoc = 1">
<img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
</xsl:if>
It is not as clean as I would because I hard-coded the src path.
I did not find out where the {imageurl} variable is extracted (if someone could help).
Subscribe to:
Post Comments (Atom)
SonarQube with Jenkins Setup using Docker Images
https://funnelgarden.com/sonarqube-jenkins-docker/ https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...
-
The competitive examination for the Indian Forest Service is conducted by Union Public Service Commission (UPSC). IFS exam is conducted ann...
-
Happy New Year. May this year is the year for your dreams, passions, everything you believe, your wishes, your desires, your thoughts, your ...
-
Azure Mobile App Service provides services that allow you to support mobile apps across multiple platforms. It does not provide hosting ser...
No comments:
Post a Comment