<?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>Dave Cavins &#187; content slider</title>
	<atom:link href="http://davecavins.com/tag/content-slider/feed/" rel="self" type="application/rss+xml" />
	<link>http://davecavins.com</link>
	<description>web design, SharePoint customization &#38; random stuff</description>
	<lastBuildDate>Wed, 28 Mar 2012 18:07:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>#SharePoint Featured Content Slider Digitally Remastered for #SP2010</title>
		<link>http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/</link>
		<comments>http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 17:01:01 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[content slider]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Designer]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=671</guid>
		<description><![CDATA[So I rewrote this web part to work a little better in SharePoint 2010. I made a few minor changes and improvements. If you can think of other improvements put them in the comments. Whats new Added an order field to the List template to allow more control of the display order. In the list [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/' rel='bookmark' title='Dynamic Drive&#8217;s Featured Content Slider in Sharepoint'>Dynamic Drive&#8217;s Featured Content Slider in Sharepoint</a></li>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So I rewrote this web part to work a little better in SharePoint 2010. I made a few minor changes and improvements. If you can think of other improvements put them in the comments.</p>
<h2>Whats new</h2>
<ul>
<li>Added an order field to the List template to allow more control of the display order. In the list template this field is setup to require unique values.</li>
<li>Re-wrote the CSS to include some new CSS3 enhancements. If you are using a newer browser the slider will look better.</li>
<li>Tested across muliple browsers. See screenshots below.</li>
</ul>
<div><span id="more-671"></span></div>
<h2>The Code</h2>
<p>Here is the XSL needed to add the web part to the page.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;XSL&gt;
&lt;xsl:stylesheet xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; version=&quot;1.0&quot; exclude-result-prefixes=&quot;xsl msxsl ddwrt&quot; xmlns:ddwrt=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; xmlns:msxsl=&quot;urn:schemas-microsoft-com:xslt&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot; xmlns:ddwrt2=&quot;urn:frontpage:internal&quot;&gt;
	&lt;xsl:output method=&quot;html&quot; indent=&quot;no&quot;/&gt;
	&lt;xsl:decimal-format NaN=&quot;&quot;/&gt;
	&lt;xsl:param name=&quot;dvt_apos&quot;&gt;'&lt;/xsl:param&gt;
	&lt;xsl:param name=&quot;ManualRefresh&quot;&gt;&lt;/xsl:param&gt;
	&lt;xsl:param name=&quot;dvt_firstrow&quot;&gt;1&lt;/xsl:param&gt;
	&lt;xsl:param name=&quot;dvt_nextpagedata&quot; /&gt;
	&lt;xsl:variable name=&quot;dvt_1_automode&quot;&gt;0&lt;/xsl:variable&gt;

	&lt;xsl:template match=&quot;/&quot; xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot;&gt;
		&lt;xsl:choose&gt;
			&lt;xsl:when test=&quot;($ManualRefresh = 'True')&quot;&gt;
				&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
					&lt;tr&gt;
						&lt;td valign=&quot;top&quot;&gt;
							&lt;xsl:call-template name=&quot;dvt_1&quot;/&gt;
						&lt;/td&gt;
						&lt;td width=&quot;1%&quot; class=&quot;ms-vb&quot; valign=&quot;top&quot;&gt;
							&lt;img src=&quot;/_layouts/images/staticrefresh.gif&quot; id=&quot;ManualRefresh&quot; border=&quot;0&quot; onclick=&quot;javascript: {ddwrt:GenFireServerEvent('__cancel')}&quot; alt=&quot;Click here to refresh the dataview.&quot;/&gt;
						&lt;/td&gt;
					&lt;/tr&gt;
				&lt;/table&gt;
			&lt;/xsl:when&gt;
			&lt;xsl:otherwise&gt;
				&lt;xsl:call-template name=&quot;dvt_1&quot;/&gt;
			&lt;/xsl:otherwise&gt;
		&lt;/xsl:choose&gt;
	&lt;/xsl:template&gt;

	&lt;xsl:template name=&quot;dvt_1&quot;&gt;
		&lt;xsl:variable name=&quot;dvt_StyleName&quot;&gt;Table&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;Rows&quot; select=&quot;/dsQueryResponse/Rows/Row&quot;/&gt;
		&lt;xsl:variable name=&quot;dvt_RowCount&quot; select=&quot;count($Rows)&quot;/&gt;
		&lt;xsl:variable name=&quot;RowLimit&quot; select=&quot;10&quot; /&gt;
		&lt;xsl:variable name=&quot;FirstRow&quot; select=&quot;$dvt_firstrow&quot; /&gt;
		&lt;xsl:variable name=&quot;LastRow&quot; select=&quot;$FirstRow + $dvt_RowCount - 1&quot; /&gt;
		&lt;xsl:variable name=&quot;IsEmpty&quot; select=&quot;$dvt_RowCount = 0&quot; /&gt;
		&lt;xsl:variable name=&quot;dvt_IsEmpty&quot; select=&quot;$dvt_RowCount = 0&quot;/&gt;

		&lt;xsl:choose&gt;
			&lt;xsl:when test=&quot;$dvt_IsEmpty&quot;&gt;
				&lt;xsl:call-template name=&quot;dvt_1.empty&quot;/&gt;
			&lt;/xsl:when&gt;
			&lt;xsl:otherwise&gt;
			&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../SiteAssets/contentslider.css&quot;/&gt;
			&lt;script type=&quot;text/javascript&quot; src=&quot;../SiteAssets/contentslider.js&quot;&gt;&lt;/script&gt;
				&lt;div class=&quot;sliderContainer&quot;&gt;
				&lt;div id=&quot;slider1&quot; class=&quot;sliderwrapper&quot;&gt;
					&lt;xsl:call-template name=&quot;dvt_1.body&quot;&gt;
						&lt;xsl:with-param name=&quot;Rows&quot; select=&quot;$Rows&quot;/&gt;
						&lt;xsl:with-param name=&quot;FirstRow&quot; select=&quot;1&quot; /&gt;
						&lt;xsl:with-param name=&quot;LastRow&quot; select=&quot;$LastRow - $FirstRow + 1&quot; /&gt;
					&lt;/xsl:call-template&gt;
				&lt;/div&gt;
				&lt;div id=&quot;paginate-slider1&quot; class=&quot;pagination&quot;&gt;&lt;/div&gt;
				&lt;/div&gt;
				&lt;script type=&quot;text/javascript&quot;&gt;
				featuredcontentslider.init({
				id:&amp;quot;slider1&amp;quot;,
				contentsource:[&amp;quot;inline&amp;quot;,&amp;quot;&amp;quot;],
				toc: &amp;quot;#increment&amp;quot;,
				nextprev:[&amp;quot;Prev&amp;quot;,&amp;quot;Next&amp;quot;],
				enablefade:[true,0.2],
				autorotate:[true,3000],
				onChange: function(previndex,curindex){}
				})
				&lt;/script&gt;
			&lt;/xsl:otherwise&gt;
		&lt;/xsl:choose&gt;
		&lt;xsl:call-template name=&quot;dvt_1.commandfooter&quot;&gt;
			&lt;xsl:with-param name=&quot;FirstRow&quot; select=&quot;$FirstRow&quot; /&gt;
			&lt;xsl:with-param name=&quot;LastRow&quot; select=&quot;$LastRow&quot; /&gt;
			&lt;xsl:with-param name=&quot;RowLimit&quot; select=&quot;$RowLimit&quot; /&gt;
			&lt;xsl:with-param name=&quot;dvt_RowCount&quot; select=&quot;$dvt_RowCount&quot; /&gt;
			&lt;xsl:with-param name=&quot;RealLastRow&quot; select=&quot;number(ddwrt:NameChanged('',-100))&quot; /&gt;
		&lt;/xsl:call-template&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.body&quot;&gt;
		&lt;xsl:param name=&quot;Rows&quot;/&gt;
		&lt;xsl:param name=&quot;FirstRow&quot; /&gt;
		&lt;xsl:param name=&quot;LastRow&quot; /&gt;
		&lt;xsl:for-each select=&quot;$Rows&quot;&gt;
			&lt;xsl:variable name=&quot;dvt_KeepItemsTogether&quot; select=&quot;false()&quot; /&gt;
			&lt;xsl:variable name=&quot;dvt_HideGroupDetail&quot; select=&quot;false()&quot; /&gt;
			&lt;xsl:if test=&quot;(position() &amp;gt;= $FirstRow and position() &amp;lt;= $LastRow) or $dvt_KeepItemsTogether&quot;&gt;
				&lt;xsl:if test=&quot;not($dvt_HideGroupDetail)&quot; ddwrt:cf_ignore=&quot;1&quot;&gt;
					&lt;xsl:call-template name=&quot;dvt_1.rowview&quot; /&gt;
				&lt;/xsl:if&gt;
			&lt;/xsl:if&gt;
		&lt;/xsl:for-each&gt;

	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.rowview&quot;&gt;
		&lt;div class=&quot;contentdiv&quot;&gt;
			&lt;img src=&quot;{@Image}&quot; alt=&quot;{@Title}&quot; align=&quot;left&quot;/&gt;
				&lt;h2&gt;&lt;a href=&quot;{@Link_x0020_URL}&quot;&gt;&lt;xsl:value-of select=&quot;@Title&quot;/&gt;&lt;/a&gt;&lt;/h2&gt;
				&lt;p&gt;&lt;xsl:value-of select=&quot;substring(@Body,1,355)&quot;/&gt;&lt;/p&gt;
				&lt;a class=&quot;readMoreButton&quot; href=&quot;{@Link_x0020_URL}&quot; title=&quot;{@Link_x0020_URL.desc}&quot;&gt;&lt;xsl:value-of select=&quot;@Link_x0020_URL.desc&quot; disable-output-escaping=&quot;yes&quot;/&gt;
				&lt;/a&gt;
		&lt;/div&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.empty&quot;&gt;
		&lt;xsl:variable name=&quot;dvt_ViewEmptyText&quot;&gt;There are no items to show in this view.&lt;/xsl:variable&gt;
		&lt;table border=&quot;0&quot; width=&quot;100%&quot;&gt;
			&lt;tr&gt;
				&lt;td class=&quot;ms-vb&quot;&gt;
					&lt;xsl:value-of select=&quot;$dvt_ViewEmptyText&quot;/&gt;
				&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.commandfooter&quot;&gt;
		&lt;xsl:param name=&quot;FirstRow&quot; /&gt;
		&lt;xsl:param name=&quot;LastRow&quot; /&gt;
		&lt;xsl:param name=&quot;RowLimit&quot; /&gt;
		&lt;xsl:param name=&quot;dvt_RowCount&quot; /&gt;
		&lt;xsl:param name=&quot;RealLastRow&quot; /&gt;
		&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;4&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt;
			&lt;tr&gt;
				&lt;xsl:if test=&quot;$FirstRow &amp;gt; 1 or $dvt_nextpagedata&quot;&gt;
					&lt;xsl:call-template name=&quot;dvt_1.navigation&quot;&gt;
						&lt;xsl:with-param name=&quot;FirstRow&quot; select=&quot;$FirstRow&quot; /&gt;
						&lt;xsl:with-param name=&quot;LastRow&quot; select=&quot;$LastRow&quot; /&gt;
						&lt;xsl:with-param name=&quot;RowLimit&quot; select=&quot;$RowLimit&quot; /&gt;
						&lt;xsl:with-param name=&quot;dvt_RowCount&quot; select=&quot;$dvt_RowCount&quot; /&gt;
						&lt;xsl:with-param name=&quot;RealLastRow&quot; select=&quot;$RealLastRow&quot; /&gt;
					&lt;/xsl:call-template&gt;
				&lt;/xsl:if&gt;
			&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.navigation&quot;&gt;
		&lt;xsl:param name=&quot;FirstRow&quot; /&gt;
		&lt;xsl:param name=&quot;LastRow&quot; /&gt;
		&lt;xsl:param name=&quot;RowLimit&quot; /&gt;
		&lt;xsl:param name=&quot;dvt_RowCount&quot; /&gt;
		&lt;xsl:param name=&quot;RealLastRow&quot; /&gt;
		&lt;xsl:variable name=&quot;PrevRow&quot;&gt;
			&lt;xsl:choose&gt;
				&lt;xsl:when test=&quot;$FirstRow - $RowLimit &amp;lt; 1&quot;&gt;1&lt;/xsl:when&gt;
				&lt;xsl:otherwise&gt;
					&lt;xsl:value-of select=&quot;$FirstRow - $RowLimit&quot; /&gt;
				&lt;/xsl:otherwise&gt;
			&lt;/xsl:choose&gt;
		&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;LastRowValue&quot;&gt;
			&lt;xsl:choose&gt;
				&lt;xsl:when test=&quot;$LastRow &amp;gt; $RealLastRow&quot;&gt;
					&lt;xsl:value-of select=&quot;$LastRow&quot;&gt;&lt;/xsl:value-of&gt;
				&lt;/xsl:when&gt;
				&lt;xsl:otherwise&gt;
					&lt;xsl:value-of select=&quot;$RealLastRow&quot;&gt;&lt;/xsl:value-of&gt;
				&lt;/xsl:otherwise&gt;
			&lt;/xsl:choose&gt;
		&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;NextRow&quot;&gt;
			&lt;xsl:value-of select=&quot;$LastRowValue + 1&quot;&gt;&lt;/xsl:value-of&gt;
		&lt;/xsl:variable&gt;
		&lt;td nowrap=&quot;nowrap&quot; class=&quot;ms-paging&quot; align=&quot;right&quot;&gt;
			&lt;xsl:if test=&quot;$dvt_firstrow &amp;gt; 1&quot; ddwrt:cf_ignore=&quot;1&quot;&gt;
				&lt;a&gt;
				&lt;xsl:attribute name=&quot;href&quot;&gt;javascript: &lt;xsl:value-of select=&quot;ddwrt:GenFireServerEvent('dvt_firstrow={1};dvt_startposition={}')&quot; /&gt;;&lt;/xsl:attribute&gt;
				Start&lt;/a&gt;
				&lt;xsl:text disable-output-escaping=&quot;yes&quot; ddwrt:nbsp-preserve=&quot;yes&quot;&gt;&amp;amp;nbsp;&lt;/xsl:text&gt;
				&lt;a&gt;
				&lt;xsl:attribute name=&quot;href&quot;&gt;javascript: history.back();&lt;/xsl:attribute&gt;
				&lt;img src=&quot;/_layouts/images/prev.gif&quot; border=&quot;0&quot; alt=&quot;Previous&quot; /&gt;
				&lt;/a&gt;
				&lt;xsl:text disable-output-escaping=&quot;yes&quot; ddwrt:nbsp-preserve=&quot;yes&quot;&gt;&amp;amp;nbsp;&lt;/xsl:text&gt;
			&lt;/xsl:if&gt;
			&lt;xsl:value-of select=&quot;$FirstRow&quot; /&gt;
			 - &lt;xsl:value-of select=&quot;$LastRowValue&quot; /&gt;
			&lt;xsl:text disable-output-escaping=&quot;yes&quot; ddwrt:nbsp-preserve=&quot;yes&quot; xmlns:ddwrt=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot;&gt;&amp;amp;nbsp;&lt;/xsl:text&gt;

			&lt;xsl:if test=&quot;$LastRowValue &amp;lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0&quot; ddwrt:cf_ignore=&quot;1&quot;&gt;
				&lt;a&gt;
				&lt;xsl:attribute name=&quot;href&quot;&gt;javascript: &lt;xsl:value-of select=&quot;ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'};dvt_startposition={',$dvt_nextpagedata,'}'))&quot; /&gt;;&lt;/xsl:attribute&gt;
				&lt;img src=&quot;/_layouts/images/next.gif&quot; border=&quot;0&quot; alt=&quot;Next&quot; /&gt;
				&lt;/a&gt;
			&lt;/xsl:if&gt;
		&lt;/td&gt;
	&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;	&lt;/XSL&gt;
</pre>
<ul>
<li><a title="CSS Download" href="http://davecavins.com/wp-content/uploads/2012/03/contentslider.css" target="_blank">CSS (contentslider.css)</a> &#8211; This file will need to be referenced in the page for it to work properly</li>
<li><a title="javascript" href="http://davecavins.com/wp-content/uploads/2012/03/contentslider.js" target="_blank">Javascript (contentslider.js)</a> - This file will need to be referenced in the page for it to work properly</li>
<li><a title="List template" href="http://davecavins.com/wp-content/uploads/2012/03/FeaturedContentList.zip" target="_blank">List Template</a> &#8211; Change the file extension to stp once you download this file.</li>
</ul>
<div>For  instructions on how to set everything up <a title="Old post" href="http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/">please see my previous post</a>.  Questions or suggestions? Leave them in the comments.</div>
<h2>Here is what you get</h2>
<p>IE7</p>
<div id="attachment_677" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-677" title="IE" src="http://davecavins.com/wp-content/uploads/2012/03/IE.jpg" alt="" width="590" height="347" /><p class="wp-caption-text">Internet Explorer 7</p></div>
<p>Google Chrome</p>
<div id="attachment_679" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-679" title="chrome" src="http://davecavins.com/wp-content/uploads/2012/03/chrome.jpg" alt="" width="590" height="323" /><p class="wp-caption-text">Google Chrome</p></div>
<p>FireFox</p>
<div id="attachment_678" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-678" title="ff" src="http://davecavins.com/wp-content/uploads/2012/03/ff.jpg" alt="" width="590" height="324" /><p class="wp-caption-text">Mozilla Firefox</p></div>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/' rel='bookmark' title='Dynamic Drive&#8217;s Featured Content Slider in Sharepoint'>Dynamic Drive&#8217;s Featured Content Slider in Sharepoint</a></li>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Drive&#8217;s Featured Content Slider in Sharepoint</title>
		<link>http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/</link>
		<comments>http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/#comments</comments>
		<pubDate>Tue, 12 May 2009 18:39:56 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[content slider]]></category>
		<category><![CDATA[dynamic drive]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Designer]]></category>
		<category><![CDATA[xsl]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=11</guid>
		<description><![CDATA[I have used Dynamic Drive&#8217;s Featured Content Slider on a couple of recent projects and wanted to see if I could get it working in SharePoint. There were several key requirements: User can easily add items Users  can choose a style for each item Expired Items must not show Each item will have a Title, Body [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/' rel='bookmark' title='#SharePoint Featured Content Slider Digitally Remastered for #SP2010'>#SharePoint Featured Content Slider Digitally Remastered for #SP2010</a></li>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/12/css-tricks-anythingslider-in-sharepoint/' rel='bookmark' title='CSS-Tricks AnythingSlider in SharePoint'>CSS-Tricks AnythingSlider in SharePoint</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have used <a href="http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm" target="_blank">Dynamic Drive&#8217;s Featured Content Slider</a> on a couple of recent projects and wanted to see if I could get it working in SharePoint. There were several key requirements:</p>
<ol>
<li>User can easily add items</li>
<li>Users  can choose a style for each item</li>
<li>Expired Items must not show</li>
<li>Each item will have a Title, Body and a customizable &#8220;read more&#8221; link.</li>
</ol>
<p>Here&#8217;s how I did it.</p>
<p><img class="alignnone size-full wp-image-155" title="slider" src="http://davecavins.com/wp-content/uploads/2009/05/slider.jpg" alt="slider" width="596" height="242" /> </p>
<p>First I created a custom list to store the slider items.  These are the columns I used:</p>
<p>Title &#8211; Single Line of text<br />
Body &#8211; Multiple Lines of text<br />
Link URL &#8211; HyperLink<br />
Expiration &#8211; Date and Time (expired items will not be shown)<br />
Image &#8211; Picture<br />
Style &#8211; Choice  (we will use this column to allow users to choose the style of each item)</p>
<p>On the page I used a DataView WebPart to display the Title, Body, Image and Link URL columns.   Using Sharepoint Designer I setup filtering on the expiration date.  To do this in design view right click on the data view webpart and bring up the &#8220;Common Data View Tasks &#8221; box and choose Filter.  In the window I set the conditional statement so that items would only be shown if the expiration date was greater than today.<span id="more-11"></span></p>
<p>You can find a basic tutorial on using the DVWP <a href="http://www.endusersharepoint.com/?p=1629" target="_blank">here</a></p>
<p>Once we have the data we want showing on the page we need to get it into the right format.  For the Content Slider to work properly the page needs to refernce an external JavaScript file and a CSS style sheet. Additionally the Slider itself has to follow this pattern:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;slider1&quot; class=&quot;sliderwrapper&quot;&gt;
&lt;div class=&quot;contentdiv&quot;&gt;Content 1 Here.
&lt;/div&gt;
&lt;div id=&quot;paginate-slider1&quot; class=&quot;pagination&quot;&gt;&lt;/div&gt;
</pre>
<p>Basically the whole content slider has do be wrapped in a div with an ID of &#8216;slider1&#8242;  each of the items must be wrapped in a div with the class &#8216;contentdiv&#8217;.  For more explanation on this <a href="http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm" target="_blank">visit Dynamic Drive</a></p>
<p>SharePoint uses xsl to style the data view so we have to go into the code view and add the nessecary Javascript, CSS and div elements to make everything work. Here is the xsl I used to get everything working in the page</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Xsl&gt;
&lt;xsl:stylesheet xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; version=&quot;1.0&quot; exclude-result-prefixes=&quot;xsl msxsl ddwrt&quot; xmlns:ddwrt=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; xmlns:msxsl=&quot;urn:schemas-microsoft-com:xslt&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot; xmlns:ddwrt2=&quot;urn:frontpage:internal&quot;&gt;
	&lt;xsl:output method=&quot;html&quot; indent=&quot;no&quot;/&gt;
	&lt;xsl:decimal-format NaN=&quot;&quot;/&gt;
	&lt;xsl:param name=&quot;dvt_apos&quot;&gt;&amp;apos;&lt;/xsl:param&gt;
	&lt;xsl:param name=&quot;Today&quot;&gt;CurrentDate&lt;/xsl:param&gt;
	&lt;xsl:variable name=&quot;dvt_1_automode&quot;&gt;0&lt;/xsl:variable&gt;
	&lt;xsl:template match=&quot;/&quot; xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot;&gt;
		&lt;xsl:call-template name=&quot;dvt_1&quot;/&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1&quot;&gt;
		&lt;xsl:variable name=&quot;dvt_StyleName&quot;&gt;Table&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;Rows&quot; select=&quot;/dsQueryResponse/Rows/Row&quot; /&gt;
		&lt;div id=&quot;slider1&quot; class=&quot;sliderwrapper&quot;&gt;
			&lt;xsl:call-template name=&quot;dvt_1.body&quot;&gt;
				&lt;xsl:with-param name=&quot;Rows&quot; select=&quot;$Rows&quot; /&gt;
			&lt;/xsl:call-template&gt;
		&lt;/div&gt;
		&lt;div id=&quot;paginate-slider1&quot; class=&quot;pagination&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
featuredcontentslider.init({
	id: &quot;slider1&quot;,  //id of main slider DIV
	contentsource: [&quot;inline&quot;, &quot;&quot;],
	toc: &quot;#increment&quot;,  //Valid values: &quot;#increment&quot;, &quot;markup&quot;, [&quot;label1&quot;, &quot;label2&quot;, etc]
	nextprev: [&quot;Previous&quot;, &quot;Next&quot;],
	revealtype: &quot;click&quot;,
	enablefade: [true, 0.2],  //[true/false, fadedegree]
	autorotate: [true, 3000],  //[true/false, pausetime]
	onChange: function(previndex, curindex){  //event handler fired whenever script changes
		//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
		//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
	}
})
&lt;/script&gt; &lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.body&quot;&gt;
		&lt;xsl:param name=&quot;Rows&quot; /&gt;
		&lt;xsl:for-each select=&quot;$Rows&quot;&gt;
			&lt;xsl:call-template name=&quot;dvt_1.rowview&quot; /&gt;
		&lt;/xsl:for-each&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.rowview&quot;&gt;
		&lt;div class=&quot;contentdiv&quot;&gt;
		&lt;div class=&quot;{@Style}&quot;&gt;
		&lt;img border=&quot;0&quot; align=&quot;left&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; alt=&quot;{substring-after(@Image, ', ')}&quot; src=&quot;{substring-before(@Image, ', ')}&quot; /&gt;
	&lt;a href=&quot;{substring-before(@Link_x0020_URL, ', ')}&quot; title=&quot;{@Title}&quot;&gt;
	&lt;h1&gt;&lt;xsl:value-of select=&quot;@Title&quot; /&gt;&lt;/h1&gt;&lt;/a&gt;
	&lt;p&gt;&lt;xsl:value-of select=&quot;substring(@Body,1,330)&quot;/&gt;...&lt;/p&gt;
	&lt;a href=&quot;{substring-before(@Link_x0020_URL, ', ')}&quot; class=&quot;readMoreLink&quot; title=&quot;{substring-after(@Link_x0020_URL, ', ')}&quot;&gt;
	&lt;span class=&quot;readMoreIcon&quot;&gt;&lt;xsl:value-of select=&quot;substring-after(@Link_x0020_URL, ', ')&quot; /&gt;&lt;/span&gt;
	&lt;/a&gt;
	&lt;/div&gt;
	&lt;/div&gt;&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
&lt;/Xsl&gt;
</pre>
<p>For information on how to write xsl stylesheets read <a href="http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx">this post</a> on Heather Solomon&#8217;s site. Basically using tags like this:<br />
allows you to insert various peices of data from the list. In the xsl above I am wrapping each item with the nessacary div to make the slider work. Inside each div I am inserting the title inside an h1 tag, the first 330 characters of the body in an a p tag, and the Link URL formatted as a Hyperlink.</p>
<p>To make everything look good I had to customize the CSS that comes from Dynamic Drive. The code is below.</p>
<pre class="brush: css; title: ; notranslate">
.sliderwrapper{
position: relative; /*leave as is*/
overflow: hidden; /*leave as is*/
border: 0px;
width: 100%; /*width of featured content slider*/
height: 231px;
}
.sliderwrapper .contentdiv{
visibility:hidden; /*leave as is*/
position:absolute; /*leave as is*/
left:0;  /*leave as is*/
top:0;  /*leave as is*/
padding: 0px;
background:#fff;
width:100%;
/*width of content DIVs within slider. Total width should equal slider's inner width (390+5+5=400) */
height:100%;
filter:progid:DXImageTransform.Microsoft.alpha(opacity=100);
-moz-opacity:1;
opacity:1;
color:#fff;
font-size:x-small;
}
.contentdiv img{
height:205px;
width:270px;
margin:10px;
border:1px solid #ccc;
}
.contentdiv h1{
color:#eee;
font:normal normal large Georgia;
margin:0px;
padding:5px 0 0 0;
line-height:20px
}
.contentdiv a:hover, .contentdiv a{
text-decoration:none !important;
padding:0px;
}
.contentdiv p{
line-height:19px;
padding:0px 10px 0px 10px;
}
a.readMoreLink {
color:#555;
padding:4px;
background-color:#fff;
}
a.readMoreLink:hover {
color:#555;
text-decoration:none;
padding:4px;
background:#fff url('link_bg.gif') repeat-x bottom center;
}
.pagination{
width: 100%;
/*Width of pagination DIV. Total width should equal slider's outer width (400+10+10=420)*/
text-align: right;
padding: 3px 1px;
font-size:x-small;
background:#fff url('link_bg.gif') repeat-x bottom center;
border-top:1px solid #ccc;
}
.pagination a{
padding: 0 4px;
text-decoration: none;
color: #666;
background:#fff;
}
.pagination a.selected{
color: #fff;
background-color: #666;
}
.pagination a:hover{
color:#fff;
background:#666;
text-decoration:none;
}
</pre>
<p>In the XSL stylesheet each item is wrapped in a div, the class name for the div is pulled from the &#8216;Style&#8217; column in the list. The make the styles work I added the following CSS to my stylesheet</p>
<pre class="brush: css; title: ; notranslate">
.Red_Style{
height:230px;
background:#671818 url('red_bg.gif') repeat-x top center;
}
.Blue_Style{
height:230px;
background:#3A5E97 url('blue_bg.gif') repeat-x top center;
}
.Green_Style{
height:230px;
background:#4E8822 url('green_bg.gif') repeat-x top center;
}
</pre>
<p>All I am doing is changing the background image and color for each style. Because the div wraps each item it would be possible to also change font colors, font size, image position and more but I just wanted to keep it simple.</p>
<p>The only drawback with using the dataview webpart is that this webpart cannot be easily moved from one site to another.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/' rel='bookmark' title='#SharePoint Featured Content Slider Digitally Remastered for #SP2010'>#SharePoint Featured Content Slider Digitally Remastered for #SP2010</a></li>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/12/css-tricks-anythingslider-in-sharepoint/' rel='bookmark' title='CSS-Tricks AnythingSlider in SharePoint'>CSS-Tricks AnythingSlider in SharePoint</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

