Custom search result page in SharePoint (2007 + 2010)

Ever wanted to create your own search result page ? Just to have a layout that looks better, or more tailored to your clients needs.

So where do you start ? Well, the code in this blog will show you what xml fields are passed through, so you can xsl-your way around them. Be sure to check out the links below, they contain some great help in order to do that via dataviews in SPD!

Code to show the XML file

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
  <xmp>
    <xsl:copy-of select="*"/>
  </xmp>
</xsl:template>
</xsl:stylesheet> 

Save that xml on a page in your site. Next, you can create a new SharePoint via SharePoint Designer. Put a dataview to that xml file and you can start designing. If you are done designing, you can go in the code, select everything between tags, and paste it in the search results page display settings xsl.
More info here:

http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1669
http://knol.google.com/k/sharepoint-search-from-start-to-end#Customize_the_Search_Result

About: Marijn

Marijn Somers (MVP) has over 12 years experience in the SharePoint world, starting out with SP2007. Over the years the focus has grown to Office 365, with a focus on collaboration and document management. He is a business consultant at Balestra and Principal Content Provider for "Mijn 365 Coach" that offers dutch employee video training. His main work tracks are around user adoption, training and coaching and governance. He is also not afraid to dig deeper in the technicalities with PowerShell, adaptive cards or custom formatting in lists and libraries. You can listen to him on the biweekly "Office 365 Distilled" podcast.

%d bloggers like this: