Tuesday, November 29, 2011

Create custom Search Result Page using a basic page (No search center required)


I know this is a very basic thing which all SharePoint experts know very well when they started their JOURNEY with SharePoint but there is something very interesting & simple we missed to check or use
Here are few steps with which we can create a custom search result page in very simple way. I use word because SIMPLE because it’s not required to create any search center sites or any search pages. This can be achieved with a simple Blank web part page and with ALL OOTB features.
  • First of all create a page, (i.e. Blank web part page). I call it “Simple Search”
  • Then click on Add a web part and add following web parts in sequence.
1.      Search box
2.      Search Paging
3.      Search Core Results
  • Now click on edit page and select Search Box web part > click “Modify Shared Web part”
  • Under Miscellaneous section change – Target search results page URL to the newly created page – i.e. http://sitename/doclib/simplesearch.aspx (i.e. http://sitename/pages/simplesearch.aspx for site with publishing enabled)
  • That’s all, now when user lands on Simple Search Page and query for search he / she will get all search results on the same page and it gives the same look and feel which is there on OSSearchResult page as we have added search paging.
  • Search paging gives number of pages containing search results.
There are few more customizations which we can do on the same page like creating a custom scope for a search box or by customizing search core results.
Here are some references
Search Core Results XSLT Transformation:
Creating a Custom Search Page and Tabs in the Search Center of SharePoint Server:
Search Core Results Web Part XSLT:

1 comment:

EnglewoodRanger7 said...

This was a big help. Thanks.

Popular Posts

Disclaimer

The opinions expressed on this blog are the personal views of Pratik's SharePoint Blog, and do not represent or reflect the viewpoints or policies of any past, present, or future employer, colleague, or customer, or any other entity. The posts on this blog are provided ‘as is’ with no warranties, express or implied, and confer no rights. Use of information contained within this blog, including specific technical steps mentioned herein, is at your own risk. References to specific software products, processes, resources, or companies do not imply any endorsement.