Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8263375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:04:43+00:00 2026-06-08T04:04:43+00:00

I am trying to change the icon for the Link to Document on the

  • 0

I am trying to change the icon for the “Link to Document” on the searchResult.aspx page. I added following to the xslt of the result but then the result webpart never renders meaning the code is broke. I tried to follow SP2007 article (http://msdn.microsoft.com/en-us/library/cc789805(v=office.12).aspx) but my environment is SP 2010. Please suggest.

<div class="srch-Icon" id="{concat($currentId,'_Icon')}"> 
<xsl:if test="contenttype='LegalLinkedDocument'">  
    <img align="absmiddle" src="_layouts/images/legalLinkedIcon.gif" border="0" alt="{imageurl/@imageurldescription}" />
</xsl:if>
    <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T04:04:45+00:00Added an answer on June 8, 2026 at 4:04 am

    I believe there is a bug that prevents the ContentType metadata property being used (see http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/cd059e1c-7af6-454c-8568-a22e7755ce8c)

    You need to create a new managed metadata property and map it to the ows_ContentType crawled property (I called mine CType), after this do a full crawl (you may need to delete the index first) to have the property available in the search index.

    Then edit the Search Core Results web part and add

     <Column Name="CType"/>
    

    to Fetched Properties (under Display Properties) after <columns>

    Then update your xml to the following

    <xsl:choose>
        <xsl:when test="ctype = 'LegalLinkedDocument'">
            <img align="absmiddle" src="_layouts/images/LegalLinkedDocument.gif" border="0" alt="{imageurl/@imageurldescription}" />
        </xsl:when> 
        <xsl:otherwise>
            <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
        </xsl:otherwise>
    </xsl:choose>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m trying to change the tabbar icon color from default blue to red, but
I'm trying to find out how to change the icon of a JStree node
Am trying to change the button frame according to the orientation change but button
I'm trying to use a themeroller icon on a page and it's not lining
I'm trying to change the state of a Gtk status icon from a thread
Im trying to change the icon on the handle when i try to open
I don't know if the question is very accurate but I'm trying to change
I'm using KML to load an image overlay, and then I'm trying to change
I'm using NetBeans, trying to change the familiar Java coffee cup icon to a
I am trying to change the icon that shows for the System Root, C:\Windows.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.