|
I was working on an integrating the anythingslider with the SharePoint Content Query Web Part, Dave Cavins gives and example on using it with the dataview web part which is not available anymore so I had to use the content query web part. After going through many trials , I had to change the “ContentQueryMain.xsl” style sheet and the ItemStyle.xsl.
- On the ItemStyle.xsl, I have added a new custom style for my anything slider
<xsl:template name="AnyThingCustomStyle" match="Row[@Style='C4ICustomStyle']" mode="itemstyle">
<li>
<div class="textSlide">
<!-- display the item title and a link to the item -->
<h3><xsl:value-of select="@Title" /></h3>
<!-- display the body of the item -->
<div id="quoteSlide">
<blockquote>
<xsl:value-of select="@Body" disable-output-escaping="yes" />
</blockquote>
</div>
</div>
</li>
</xsl:template>
- And I modified the ContentQueryMain.xsl main loop to contain a choose and in case it is “AnyThingCustomStyle” it uses a different template than the one used with the default templates
<xsl:choose>
<xsl:when test="$IsSlider=' AnyThingCustomStyle '">
<div class="anythingSlider">
<div class="wrapper">
<ul>
<xsl:for-each select="$Rows">
<xsl:variable name="CurPosition" select="position()" />
<xsl:call-template name="OuterTemplate.CallItemTemplate">
<xsl:with-param name="CurPosition" select="$CurPosition" />
</xsl:call-template>
</xsl:for-each>
</ul>
</div>
</div>
</xsl:when>
<xsl:otherwise>
|