0

Is it default behaviour that the icon next to a result showing a document library folder is a blank page? (generaldocument.gif) My customer would like to see a folder icon here and I don't understand why it isn't displayed. Just to be clear: the link shows the direct path to the folder (and not to a webpart on a page or something similar)

For example: http://host/subsite/subsite/subsite/document library/folder/folder/folder

How can I manage to change this behaviour?

0

I found a solution to my problem. I had to edit the XSL of the Core Search Webpart:

I replaced this line in the original XSL: <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />

with this:

<div class="srch-Icon" id="{concat($currentId,'_Icon')}">
  <xsl:choose>
    <xsl:when test="contentclass[. = 'STS_ListItem_DocumentLibrary'] and isdocument[. = 'False']">
      <img align="absmiddle" src="/_layouts/images/folder.gif" border="0" alt="{imageurl/@imageurldescription}" />
    </xsl:when>
    <xsl:otherwise>
      <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
    </xsl:otherwise>
  </xsl:choose>
</div>

I got this hint from http://social.technet.microsoft.com/Forums/sharepoint/en-US/a993cc6d-690a-439f-9db3-cf08d6a9cee4/change-the-folders-icon-displayed-in-search-results, but had to modifiy the original script a little bit to get it working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.