Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How to create a web application level feature that displays a small icon/sign that is located besides every returned search results ?

The Client wants a custom web part for MOSS 2007 and SP 2010, whenever hs uses the Search. He wants to see a small printer icon/sing that is located besides every single returned search result, and if the User clicked on it then it should print out the page of that particular search result.

The Printing functionality is OK, But, How to display icon next to every search result ?

BTW, the Client has 3 projects (2 of them are MOSS 2007 and one is SP 2010), that's why he asked a generic web part in order to use it with all projects.

I would greatly appreciate any inputs !

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

If you are using the Core Result Web Part for rendering your results, then you will have to modify the xslt for the web part and add in rendering code for your print icon and click logic.

On SP2010 you could for example change the following part of the xslt which shows the file type icon

<div class="srch-Icon" id="{concat($currentId,'_Icon')}">
   <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
</div>

to

<div class="srch-Icon" id="{concat($currentId,'_Icon')}">
   <img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
   <img src="path/printicon.gif" onclick="myprintfunction()" />
</div>

Where path/printicon.gif points to your print icon, and myprintfunction() does your print logic.

share|improve this answer
add comment

It is explained here:

http://sharepointblog.dk/post/2009/07/21/Skift-ikoner-i-sc3b8geresultatet.aspx

The article is in Danish, but you should be able to translate it using Google Translate, or similar...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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