DCSIMG
MOSS Custom search results page- add rank chart - Meron Fridman's Blog

Meron Fridman's Blog

MOSS Custom search results page- add rank chart

 

With simple XSLT template you can add small chart that displays the rank for each item in the Search Core Results Web Part. You may find it useful especially when you sort by modified date.

Add the following template to the XSLT:

<!-- The rank chart disply for each result is prepared here -->

<xsl:template name="DisplayRank">

 

            <xsl:param name="rank" />

            <table cellpadding="0" height="8" cellspacing="4" align="right" width="150">

                  <tr>

                        <td align="left">

                              <table width="50px;" height="8"  cellpadding="0" cellspacing="0" style="border: 1px solid #000000;" align="left">

                                    <tr>

                                          <td>

                                                <table cellpadding="0" cellspacing="0" height="8" style="border: 0px solid #000000;">

                                                      <xsl:attribute name="width">

                                                            <xsl:value-of select="$rank div 10"/>&#37;

                                                      </xsl:attribute>

                                                      <tr >

                                                            <td style="background-color:#E4E4E4;">&#160;</td>

                                                      </tr>

                                                </table>

                                          </td>

                                    </tr>

                              </table>

                        </td>

                        <td width="70" align="left">

                              Rank :<xsl:value-of select="$rank div 10"/>&#37;

                        </td>

                  </tr>

            </table>

 

 

      </xsl:template>

 

Add in the  <xsl:template match="Result"> call to the template that you created before:

<xsl:call-template name="DisplayRank">

      <xsl:with-param name="rank" select="rank" />

</xsl:call-template>

That's it.

Click here to dowlnload the full xslt.

 

תוכן התגובה

sagiva כתב/ה:

but the trick is to create or manipulate the rank , no ?

# September 24, 2007 3:26 PM

сайдинг כתב/ה:

6bI'll thingk about it.0u I compleatly disagree with last post .

<a href="all-siding.ru/index.php сайдинга</a> 6d

<a href="all-siding.ru/index.php сайдинг</a> 9d

# August 18, 2008 6:39 AM

������� �� ����� כתב/ה:

dosugcz.biz/in.htm �������� ����� �������� ������� �� ������ �������� ���� ����� � ������ ���� ����� ��������� � ����

�������� � ����� �������� ����������

# August 15, 2009 10:57 PM
שלח תגובה

(שדה חובה)  

(שדה חובה)  

(אופציונלי)

(שדה חובה) 


Enter the numbers above: