Click here to Skip to main content
15,887,135 members
Articles / Programming Languages / XSLT
Article

Customizing SharePoint Search Results (Deleting Author & Date)

Rate me:
Please Sign up or sign in to vote.
2.00/5 (1 vote)
12 May 2008CPOL1 min read 26.4K   15   1
Customizing SharePoint Search Results (Deleting Author & Date)

Introduction

I am going to show you how you can change SharePoint default search result screen. Search Core Result web part comes with some field such as title, description, url, author and date. Sometimes you don’t want to show some fields. If you are using SP Search API then you can show any field that you want but we will do it with default web part without coding.

Image 1

Using the code

Let’s create a simple result page. In your web portal click Site Action > Create Page. Select the (Welcome Page) Search Result Page layouts and then click cerate. In the new web page edit the Search Core Result web part. ( Edit > Modify Shared Web Part ). There is an xsl file under the Data View Properties Tab, click XSL Editor button. If you check out this file you can see fields and styles. (Use Visual Studio or another xml editor to editing.. )

Find the “<xsl:with-param name="str" select="author" />” line. As you see, these lines indicate which field will be showen.Now drop lines shown bellow.


Image 2


After modifying click OK and publish the page and search something. You will see a result page like bellow.

Image 3

You can modify this XSL file as you want.

HAVE A NICE MOSS !!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader BELBIM INC.
Turkey Turkey
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionCan you help me? Pin
Florian Adler25-Apr-13 23:10
Florian Adler25-Apr-13 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.