I have a big issue and a question about CQWP and slider. I have an image library which will serve as a news library. I've set a CQWP on my homepage which will display Image, title and comments columns, and give the proper url link.
So, first, the question : how to know which column name should i use? I don't ge thow to use the column names in xsl templates.
Because for the comments, i wrote in my ItemStyle.xsl :
<xsl:variable name="DisplayDesc"><xsl:value-of select="@Comments"/></xsl:variable>
<!-- some more code for displaying title...-->
<b><xsl:value-of select="$DisplayDesc" disable-output-esacping="yes"/></b>
And nothing of my comment is displayed.
Now, i have a serious issue :
i've used Flexslider to set up my slideshow. For the moment, i have only two images to show, Image1, and Image2. But my slider displays in order : Image1,Image2,Image1 and a blank slide.
I don't know where this come from, either why Image1 is cloned.
here is my html output, copied on IE developper tool :
Here are the code i've used : To launch flexslider :
$('.flexslider').flexslider({
animation:"slide",
controlNav:false,
prevText:"précédent",
nextText:"suivant",
minItems:1,
maxItems:20,
itemWidth:400
});
My custom template, which i've declared in myItemStyle.xsl
<xsl:template name="HomePage-Slider" match="Row[@Style='HomePage-Slider']" mode="itemstyle">
<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="SafeImageUrl"><xsl:call-template name="OuterTemplate.GetSafeStaticUrl"><xsl:with-param name="UrlColumnName" select="'ImageUrl'"/></xsl:call-template></xsl:variable>
<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="DisplayDesc"><xsl:value-of select="@Comments"/></xsl:variable>
<li>
<a href="{$SafeLinkUrl}">
<xsl:if test="$ItemsHaveStreams = 'True'"><xsl:attribute name="onclick"><xsl:value-of select="@OnClickForWebRendering"/></xsl:attribute></xsl:if>
<xsl:if test="$ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'"><xsl:attribute name="onclick"><xsl:value-of disable-output-escaping="yes" select="$OnClickTargetAttribute"/></xsl:attribute></xsl:if>
<img src="{$SafeImageUrl}" title="{@DisplayTitle}">
<xsl:if test="$ImageWidth != ''"><xsl:attribute name="width"><xsl:value-of select="$ImageWidth" /></xsl:attribute></xsl:if>
<xsl:if test="$ImageHeight != ''"><xsl:attribute name="height"><xsl:value-of select="$ImageHeight" /></xsl:attribute></xsl:if>
</img>
</a>
<p class="flex-caption">
<!--<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>-->
<b><xsl:value-of select="$DisplayTitle"/></b>
<b><xsl:value-of select="$DisplayDesc" disable-output-escaping="yes"/></b>
</p>
</li>
</xsl:template>
Could you help me with these please? I'm quite desperate at this point..
li
elements with classclone
, and it is appearing on the your given DOM. It seems that your display template is being called more than one time.clone
will automatically appear when the flexslider jquery plugin will initialize. There should be no matter of item count. Also check you have not given SharePoint classdfwp-item
inli
element, though it is rendering. So it might be the case that some other template is being called as well.