<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pedro Innecco &#187; microsoft search server</title>
	<atom:link href="http://www.pedroinnecco.com/tags/microsoft-search-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pedroinnecco.com</link>
	<description>ICT Specialist: pgDMS, MBA, MCBMSS, MCTS, MCP</description>
	<lastBuildDate>Thu, 22 Apr 2010 03:05:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>webDAV and SharePoint: Customising the search results</title>
		<link>http://www.pedroinnecco.com/2008/03/webdav-and-sharepoint-customising-the-search-results/</link>
		<comments>http://www.pedroinnecco.com/2008/03/webdav-and-sharepoint-customising-the-search-results/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 13:33:49 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[microsoft search server]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/index.php/2008/03/05/webdav-and-sharepoint-customising-the-search-results/</guid>
		<description><![CDATA[If you are using Enterprise Search for a network location accessible through webDAV, you will find that clicking on search results will try to open the results in Internet Explorer. Here is a quick method to add an option for users to open links as Web Folders. NOTE1: This only works in Internet Explorer 5 [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using Enterprise Search for a network location accessible through webDAV, you will find that clicking on search results will try to open the results in Internet Explorer. Here is a quick method to add an option for users to open links as Web<br />
Folders.</p>
<p><strong>NOTE1:</strong> This only works in Internet Explorer 5 or above<br />
<strong>NOTE2: </strong>You will need SharePoint Designer for this tutorial<br />
<strong>NOTE3:</strong> You must have a knowledge of html (understand tags, elements and attributes)</p>
<p><span id="more-33"></span></p>
<ol>
<li>Launch SharePoint Designer and open your SharePoint site. Find your <span class="path-name">results.aspx</span> page from your search centre, and make a copy of it. Let&#8217;s call this file <span class="path-name">docresults.aspx</span> in our example.<br />
<blockquote><p><strong>NOTE: </strong>You could as well modify your default <span class="path-name">results.aspx</span> search page, but this is not really recommended as updates could break your work. Instead, make custom pages and configure SharePoint to use it.</p></blockquote>
</li>
<li>Now edit the new file you created, called <span class="path-name">docresults.aspx</span>. Looking at the code, you must add the following line under <code>&lt;style type=&quot;text/css&quot;&gt;</code>:<br />
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a <span style="color: #00AA00;">&#123;</span>behavior<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#default</span><span style="color: #cc00cc;">#AnchorClick</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

</blockquote>
</li>
<li>Save the file, and exit Web SharePoint Designer.</li>
<li>If you created a custom search results page, you must now follow steps 5 to 7 in order to configure your site to use the appropriate results page. Otherwise jump to step 8.</li>
<li>Navigate to your portal as a SharePoint administrator. Click on Site Actions menu and select Site Settings.</li>
<li>Under Site Collection Administration, click on the Search scopes option.</li>
<li>For each scope you want to use the custom search results page, you must change is settings and specify the filename of the target results page you want to use (e.g.: <span class="path-name">docresults.aspx</span>).</li>
<li>Now do a search (any search) on your site using a scope that would return results using the custom page.</li>
<li>On the results page, click on Site Actions menu and select Edit Page.</li>
<li>Locate your Search Core Results Web Part (should be on the Bottom Zone by default) and click on the edit menu. Choose Modify Shared Web Part.</li>
<li>Now, under the Search Core Results edit panel you should find a section called Data View Properties. Under this section, click on XSL Editor&#8230; button.</li>
<li>You can now see the code used for returning search results. What we need to look for here is the cold responsible for each result returned. Look for <code>&lt;xsl:template match=&quot;Result&quot;&gt;</code><br/><br />
You can see under this tag that each search result comprises of some span tags. Let&#8217;s have a look at three particular ones:</p>
<ul>
<li><strong><code>srch-Icon:</code></strong> The icon representing the application used to open the object returned</li>
<li><strong><code>srch-Title:</code></strong> The title of the object returned in the search result </li>
<li><strong><code>srch-URL:</code></strong> The URL of the object returned</li>
</ul>
<p><br/>We are paying attention to these three span tags because they are clickable http links. You can see that each of these spans have a <code>&lt;a&gt;</code> (anchor) element, which contains a <code>href=&quot;{$url}&quot;</code> attribute. If you want to make one of these links open the file in webDAV mode, all that you need to to is add the following extra attribute into the anchor of each span:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;">folder<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;{$url}&quot;</span></pre></div></div>

</blockquote>
<p>Alternatively, you could add an extra span containing a link to open in webDAV mode. Here is a snip of code which you could include just after the closing of the <strong><code>src-title</code></strong> span tag:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;span&gt;&lt;a href=&quot;{$url}&quot; folder=&quot;{url}&quot;
id=&quot;{concat(’CSR_IMG_’,$id)}&quot;
title=&quot;Click here to open the target folder in
webDAV mode using Windows Explorer.&quot;&gt;
[Open in WebDAV]&lt;/a&gt;&lt;/span&gt;</pre></div></div>

</blockquote>
</li>
<li>Click on Save to close the Web Part text editor. Click OK on the Search Core Results edit panel. Finally, click on Exit Edit Mode (just under the Site Actions menu) to finish.</li>
</ol>
<p>That&#8217;s all! Hope you find this useful! For more information about the behaviour of webDAV folders in Internet Explorer, refer to this <a href="http://msdn2.microsoft.com/en-us/library/ms531432(VS.85).aspx">MSDN article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2008/03/webdav-and-sharepoint-customising-the-search-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
