Recently I’d a requirement to create a slideshow in SharePoint 2007 and content query web part is great for these types of scenarios where a list has to be query and list items are to be rendered with some HTML. There are a lot of great jQuery plug-ins available for slideshow, we’ll be using jQuery.Popeye. You can use the following steps to use any other plug-in if you like, okay so let’s get started.
- Download jQuery and jQuery.Popeye plugin
- Go to Style Library, open with explorer and paste jQuery.Popeye folder from the downloaded archive along with jquery-1.8.1.min.js
- Create a Picture Library and upload images that you’d like to be displayed in Slide Show.
- We’ve to create a new XSL template which will generated the necessary HTML for slide show so open the site in SharePoint Designer and then navigate to All Files, Style Library, XSL Style Sheets, make copy of
ItemStyle.xsl and then edit
ItemStyle.xsl.
- Go to bottom of the file and paste the following XSL before
</xsl:stylesheet>
.
<xsl:template name="PopeyeSlideShow" match="Row[@Style='PopeyeSlideShow']" mode="itemstyle">
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@Title"/>
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="Header">
<xsl:if test="count(preceding-sibling::*)=0">
<
Hope you find this post useful, thanks for reading.