none
Change the folders icon displayed in search results RRS feed

  • Question

  •  

    Hi All,

    I want to Change the icon for the folders displayed in search results. Currently for the sub folders i am getting IE icon which we normally get for HTML pages .If any one can guide me to solve this problem it would be great help.

     

    Thanks in Advance !!

    Wednesday, May 7, 2008 6:13 AM

All replies

  • If I am not wrong, We can completely customize the look and feel of Reluts by editing the XSLT of Search Results webpart. You should be able to edit the HTML for the generated image too.

    --
    Madhur
    Wednesday, May 7, 2008 8:28 AM
  • Hi Madhur,

    Thanks for ur reply.I dont wnat to change the layout of core result webpart, i want to change the icon that we see for each result. For ex: for word documents we get word doc symbol, for html pages we get IE explorer symbol, in the similar way i want to change the symbol that we see for sub folders in the results.Presently i m getting IE symbol for folders also which is incorrect so i want to change that.

    I hope u got my query.

     

    Wednesday, May 7, 2008 12:02 PM
  • Hello

     

    In search result page xslt it is showing standard columns like author, id, workid etc. I want to add more field from sharepoint list (a infopath document library), how can I do this? Is this possible?

     

    Ani

    Friday, May 9, 2008 1:46 PM
  •  

    Thanks for ur reply.

     

     

    I got the same problem with the Microsoft Search Server 2008 which is based on the SharePoint server. If I get a Folder Name as a search result, it shows the Internet Explorer Icon on the left side of the result.

     

    Does anyone knows how I can change this Icon to the "real" folder Icon?

     

    Regards,
    Reto

    • Edited by Mike Walsh FIN Wednesday, June 30, 2010 9:25 AM Don't use full quote.
    Friday, May 30, 2008 7:32 AM
  • Find this line in the XSL for the Search Core Results Web Part:

    <!-- This template is called for each result -->

    A few lines below that, replace this line:

    <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
    
    With this:

    <xsl:choose>
      <xsl:when test="contentclass[. = ''] and isdocument[. = '0']">
        <img align="absmiddle" src="/_layouts/images/caticon.gif" border="0" alt="{imageurl/@imageurldescription}" />
      </xsl:when>
      <xsl:otherwise>
        <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
      </xsl:otherwise> 
    </xsl:choose>
    
    Folders will now show with a folder icon instead of a web page icon.
    • Edited by rmcardle Friday, May 1, 2009 9:45 PM
    • Proposed as answer by rmcardle Friday, May 1, 2009 9:46 PM
    • Unproposed as answer by Mike Walsh FIN Saturday, May 2, 2009 6:28 AM
    Friday, May 1, 2009 9:44 PM
  • Hi ,

    I have same problem where can i find this file "XSL for the Search Core Results Web Part:" to make above change

     

    Thankns

    Rehan

    • Proposed as answer by Harsh Kapoor Wednesday, June 30, 2010 9:14 AM
    • Unproposed as answer by Mike Walsh FIN Wednesday, June 30, 2010 9:25 AM
    Wednesday, June 9, 2010 6:32 PM
  • Hi Mushtanq,

    In the right hand side: click on Site Action-> Edit Page

    There will be some web parts in your screen, scroll down Click on the edit button of the Search Core Results Web Part. Click on Modify Shared Web Part, then click on XSL Editor button.

    You will get XSLT code.

    Thanks and Regards

    Harsh

     

    • Proposed as answer by Harsh Kapoor Wednesday, June 30, 2010 9:19 AM
    • Edited by Harsh Kapoor Wednesday, June 30, 2010 9:20 AM Forgot to write name of the person
    • Unproposed as answer by Mike Walsh FIN Wednesday, June 30, 2010 9:25 AM
    Wednesday, June 30, 2010 9:19 AM
  • Harsh Kapor:

     

    Please do not propose your own posts as answers.

    Propose the good answers of other people. Wait for someone else to propose your posts.

     

    (Moderator)

     

    P.S. There is little point in you spending time on threads that are over a year since the previous post.


    2010 Books: SPF 2010; SPS 2010; SPD 2010; InfoPath 2010; Workflow etc.
    2007 Books: WSS 3.0; MOSS 2007; SPD 2007; InfoPath 2007; PerformancePoint; SSRS; Workflow
    Both lists also include books in French; German; Spanish with even more languages in the 2007 list.
    Wednesday, June 30, 2010 9:26 AM
  • Hi Mike,

    It was by mistake i have done this,

    and i didnt find anything to rollback that task.

    one suggestion for you, give the facility to rollback the task if somebody does this.

    Thanks and Regards

    Harsh

    Wednesday, June 30, 2010 12:57 PM