Scenario
We want to output search results in the format which is different from standard.
Solution
Customize search results. The easiest way to do that is to customize the output provided by Search Core Results Web part.
First part of the solution is to define the output properties and second part is to customize look-and-feel.
1. Manage output properties.
Go to your search results page -> Site Actions -> Edit Page -> Search Core Results Web Part -> Modify Shared Web Part:
In the Results Query Options section select Selected Columns button:
Copy text from the appeared Text Entry dialog into the proper XML editor. I will use Visual Studio 2008. In the Columns element create child Column elements for each property you want to output specifying the Name attribute appropriately. Name attribute should be equal to the name of a relevantmanaged property:
Copy text from the XML editor and paste it back into the Text Entry dialog. Press OK button and then press OK button to save Web part properties.
Run the search query and you should be able to see your property in the search results:
Enjoy :)
If you have any questions in regard to implementing and customizing SharePoint Search to get more efficiency in business activities for your company or you need assistance contact us now for a consultation.
Stay tuned for more useful articles from Wylde Solutions
UPD: Part 2 - Search Results Look-and-feel Customization.
We want to output search results in the format which is different from standard.
Solution
Customize search results. The easiest way to do that is to customize the output provided by Search Core Results Web part.
First part of the solution is to define the output properties and second part is to customize look-and-feel.
1. Manage output properties.
Go to your search results page -> Site Actions -> Edit Page -> Search Core Results Web Part -> Modify Shared Web Part:
In the Results Query Options section select Selected Columns button:
Copy text from the appeared Text Entry dialog into the proper XML editor. I will use Visual Studio 2008. In the Columns element create child Column elements for each property you want to output specifying the Name attribute appropriately. Name attribute should be equal to the name of a relevantmanaged property:
Copy text from the XML editor and paste it back into the Text Entry dialog. Press OK button and then press OK button to save Web part properties.
Run the search query and you should be able to see your property in the search results:
Enjoy :)
If you have any questions in regard to implementing and customizing SharePoint Search to get more efficiency in business activities for your company or you need assistance contact us now for a consultation.
Stay tuned for more useful articles from Wylde Solutions
UPD: Part 2 - Search Results Look-and-feel Customization.
Comments
Post a Comment