Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Recently Viewed...

SnowCovered Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Popular Tags...

You need to modify the settings for this module, to modify the settings click on 'settings' from within the module menu'

SharePoint Search Results Customizations


SharePoint Search Results Customizations

Version 1.0


Topics Covered –

1.   Customization to highlight search keyword

2.   Customization to open Search result items in new window

3.  Customize People Search result

Search is one of the most extensively used features within in a SharePoint portal. No one has doubt as to the accuracy and effectiveness of SharePoint searches. Often businesses have requirements for customization in searches to display and make them more effective and relevant to their needs. In this article we will discuss some of these easy to implement search customization techniques.

Customization to highlight search keyword

When you perform a search in MOSS 2007 a search core result webpart is used to display the search results. The displayed search results are in an actual XML file transformed to display the results in html format. If one wants to modify the search results in the display he will need to customize the XSLT files. This may sound like a dirty way of modifying the search results display but in fact it is much easier and quicker of a job to modify the XSLT files than one might think.  Let us see how quick it is to do this:

To demonstrate the customization we have created a site collection with Enterprise Search template.

Figure 1. Sharepoint site search page

Steps:

  1. Go to Site search box.
  2. Search for any keyword e.g. We are searching for word web site

Figure 2. Searching for keyword ‘web site’

  1. By default SharePoint search results displayed search keyword in bold( see Figure 3 ).

Figure 3. Sharepoint site result page


Now we can have a business requirement where users need the keyword to be highlighted in yellow color in place of bold text on search result page. To implement this we need to modify the core search results XSLT.

Steps to implement the change:

  1. On search result page where keyword are currently appearing in bold, click site actions and go to edit page. Now All webpart on page will appear in editable format.
  2. To modify the display we need to edit search core results webpart, locate this webpart on page and click on edit webpart option.
  3. Now it will open the tool pane of webpart in right side, click on XSLT Edit button in tool pane. It will open the webpart XSLT.

 Figure 4. Search core results webpart in editable format

Now first take a backup of XSLT.

Now copy the xslt in a blank text file and save it as xml.

Open the XML and locate the text block

<xsl:template match="c0">

- <b>

<xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c1">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c2">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c3">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c4">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c5">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c6">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c7">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c8">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>

- <xsl:template match="c9">

- <b>

  <xsl:value-of select="." />

  </b>

  </xsl:template>


Now replace above text block in xml with below text block


<xsl:template match="ddd">…</xsl:template>

- <xsl:template match="c0">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c1">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c2">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c3">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c4">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c5">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c6">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c7">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c8">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>

- <xsl:template match="c9">

- <span style="background-color:yellow">

- <b>

  <xsl:value-of select="." />

  </b>

  </span>

  </xsl:template>


Now Again open XSLT editor of webpart and replace the xslt with modified XML.

Once you apply changes in Search core results webpart tool pane, you can immediately see that keyword in search results are now highlighted in yellow color( see Figure 5).

Now publish the page and exit from editable mode.


Figure 5. Search core results webpart after implementing the change.


Now go to search homepage and again perform search on same keyword.

This time you will see keyword in search result will appear in Yellow color in place of bold text.


Figure 5. Search results with new XSLT



Simple! Yes it is.

Customization to open Search result in new window

By default when you open an document returned by search result by clicking the title,image or url of document, it opened the document in same window. Sometime SharePoint users found it very difficult as they wants to review more than one item from search result and once they click one item it opened in the search result window, also sometime closure of opened document results in closure of search result  page.  Here we will how we can customize search result to open the search result items in new window.

1.  Go to SharePoint site   

2.  Perform a search on site

3. Search result page will open.

4. On this page go to Edit page option.

5.    On search core results webpart click on edit webpart option

6.    In webpart properties, Click on the XSL Editor Button

7.    Take backup of XSLT file before modification.

8.    Now copy XSLT and open it in text pad

 Search for the lines:

<span class=”srch-Icon”>
<a href=”{$url}” id=”{concat(‘CSR_IMG_’,$id)}” title=”{$url}”>

<span class=”srch-Title”>
<a href=”{$url}” id=”{concat(‘CSR_’,$id)}” title=”{$url}”>

<span class=”srch-URL”>
<a href=”{$url}” id=”{concat(‘CSR_U_’,$id)}” title=”{$url}” dir=”ltr”>

Above lines create item url for Icon, Title and URL of search result. In current state these will open items on search result page. Now we want to open the link open in a new window. To achieve this we will add on target=”_blank” at the end of href tag.

<span class=”srch-Icon”>
<a href=”{$url}” id=”{concat(‘CSR_IMG_’,$id)}” title=”{$url}”  target =”_blank”>

<span class=”srch-Title”>
<a href=”{$url}” id=”{concat(‘CSR_’,$id)}” title=”{$url}” target =”_blank”>>

<span class=”srch-URL”>
<a href=”{$url}” id=”{concat(‘CSR_U_’,$id)}” title=”{$url}” dir=”ltr” target =”_blank”>

Now update Webpart XSLT with these modifications.

Exit from editable mode.

Now re perform the search and open item retuned in search results. Now all items will open in new window. See below, click on countrywide.doc opened page in new window.

Customizing People Search Result


Similar to SharePoint Site search you can customize people search by modifying the XSLT. Here we will show you one example of that.


In this example we will modify the URL of People Search results. Suppose your organization maintain a custom page on intranet portal for all employee and they wants that whenever you click on image url on people search, it should redirect user to this user’s intranet page . So here we will modify url to redirect users to link outside SharePoint.

Suppose you perform search for user Vik and on search result page you should be redirected to http://myintranet/default.aspx? Node =’Vik’ .


  1. Go to people search textbox box.
  2. Search for any user (does not matter user exist or not).
  3. peopleresults.aspx page will open.
  4. On this page Go to Edit page option

  1. Page will open in editable mode.
  2. Click on ModifySharedWebpart option in People Search Core Result(see below screen)

  1. Click on xslt editor in webpart property.Xslt dialog will open on screen.

  1. First take backup of existing xsl file in txt file.
  1. Now replace text of xsl file with the custom xsl file.
  1. Click on apply in webpart property.
  1. Now again search in people search box.
  1. In search result go to people image in front of search result. You can see modified url in below bar(see below screen).


Customization Detail:

  • Open xls file  of PeopleSerachResult webpart.
  • Search  for the section commented as  <!-- This template is called for each result ->(See  green rectangle on below screen)
  • Add code line mentioned in red rectangle. This will fetch account name value in variable acName.
  • Change href for the image as mentioned in blue rectangle.
  • Save the xls and start searching. You will get required url on search result image.



Feedback Comments

Feedback

SharePoint Web Parts


All Data Springs Web Parts Support WSS 3.0, SharePoint 2007, and SharePoint 2010 Frameworks

Please select license option for each web part you wish to purchase. We highly recommend the SharePoint Bundle to get all Data Springs Web Parts for maximum value!

 

 

      
Cart


Data Springs Sharepoint Bundle

Best Value! The Bundle gives you all 5 web parts in one package at a very attractive price! Best Value! We think you will be very happy with the SharePoint bundle and great price discounts you will receive. With your purchase all of the web parts below will be included.
 
 
 
 

Random Image Web Part

With Random Image for Sharepoint 2007, you can select multiple images to display randomly when the web part loads...
 
 
 
 

Stock Quote Web Part

Giving your site visitors relevant information is critical. With the Data Springs Stock Web Part you can provide your users with up to date financial information
 
 
 
 

Dynamic Image Rotator Web Part

Who would have thought? Adobe Flash® with Sharepoint! The FIRST and ONLY image rotation web part for Sharepoint using Flash Technology from Adobe! The Dynamic Image Rotator displays selected images and then rotates between the images. Several extended and optional features allow you to select the time to rotate each image, fade between
 
 
 
 

SharePoint Charts Web Part

The MOSS Chart Web Part is a web part built by Data Springs for the purpose of rendering several chart types based on data from a SharePoint list on a MOSS 2007 or WSS 3.0 Site
 
 
 
 

Dynamic News Ticker Web Part

Provide current news items with a user-friendly news ticker for your Sharepoint Portal. With millions of web sites offering information you need a fun way to display information and the solution is Flash News Ticker....
 
 
 
 

Tailored Text Web Part

 Tailored Text Web Part allows you to add text/html to your web site that can be different for anonymous users, registered users,  and even individual users specifically.

 
 
 
 

Dynamic Views Web Part

Dynamic Views is an excellent tool to:
Personalization allows you to go the extra mile in communicating or connecting one to one with your clients. When it comes to technology and web site content, you now have the power to leverage this personalization directly with your users on your DotNetNuke® site

 
 
 
 

Dynamic Login Web Part

Your site content isn't vanilla, so why is your portal's login?

Add pizazz and functionality with Dynamic Login! Use custom templates, localization, redirection rules for various roles and many more features!
 
 
 
 


An error has occurred. Error: Back on Track - Track Pages is currently unavailable.
 
 

Join our mailing list...

Get current news and events the easy way
 
 
   
Subscribe Me

Recent Blogs...

 
Copyright 2005 - 2011 by Data Springs, Inc.
 
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi