Partilhar via


How to: Add a column in search results page

  1. Add a column in document library(exp. tjcolumn)
  2. Add an item in this document library and fill in the column value
  3. Go to search settings in SSP
  4. Go to content sources
  5. Crawl the content
  6. Go to metadata properties
  7. Create a new metadata property
  8. Add mapping(tjprop) to column(it should be like ows_tjcolumn(text))
  9. Crawl the content
  10. Go to search site
  11. Go to core results webpart, modify web part properties
  12. Go to results query options -> selected columns
  13. Add a column here(exp. <column name="tjprop" />)
  14. Go to data view properties -> xsl editor
  15. Check for the below portion and add the column as mentioned in highlighted part, save and exit

                                                <xsl:call-template name="DisplaySize">
                                                                <xsl:with-param name="size" select="size" />
                                                </xsl:call-template>
                                                <xsl:call-template name="DisplayString">
                                                                <xsl:with-param name="str" select="author" />
                                                </xsl:call-template>

                                                 ----------------------
                                                <xsl:call-template name="DisplayString">
                                                                <xsl:with-param name="str" select="tjprop" />
                                                </xsl:call-template>
                                                 ------------------------
                                                <xsl:call-template name="DisplayString">
                                                                <xsl:with-param name="str" select="write" />
                                                </xsl:call-template>
                                                <xsl:call-template name="DisplayCollapsingStatusLink">
                                                                <xsl:with-param name="status" select="collapsingstatus"/>
                                                                <xsl:with-param name="urlEncoded" select="urlEncoded"/>
                                                                <xsl:with-param name="id" select="concat('CSR_CS_',$id)"/>
                                                </xsl:call-template>