I have a fading image carousel (code below) where it pulls the images from my umbraco field image1 etc, i want it to also display a title for each image also pulled from a umbraco field (title1) but am struggling!
// Large images to use and thumbnail settings images :[ <xsl:for-each select="umbraco.library:Split('image1,image2,image3,image4,image5,image6,image7,image8,image9,image10', ',')/value"><xsl:variable name="value" select="text()"/><xsl:if test="normalize-space($currentPage/*[name() = $value])"><xsl:variable name="image" select="umbraco.library:GetMedia($currentPage/*[name() = $value], 0)"/><xsl:if test="$image/umbracoFile">{ image :'<xsl:value-of select="$image/umbracoFile"/>', alt :'<xsl:value-of select="$image/@nodeName"/>', text :'<xsl:value-of select="$image/@nodeName"/>'}<xsl:if test="position() != last()">,</xsl:if></xsl:if> </xsl:if></xsl:for-each> ], thumbnailActivationEvent : "click",
//Classes of HTML elements to use mainImageClass :"picture-slides-image",// Mandatory fadeContainerClass :"picture-slides-fade-container" }); </script>
<divid="container"> <divid="picture-slides-frame"> <divclass="picture-slides-container"> <divclass="picture-slides-fade-container"> <imgclass="picture-slides-image"width="680px"height="310px"src="about:blank"alt="This is pictur"/> </div> </div> </div>
The images are displaying perfectly, what i want is to also display text at the bottom of each image, i have created the fields named title1 up to 10 so would like image1 to display title1 at the bottom image2 display title2 and so on?
I think I understand what you're trying to do but it looks as though it's going to be very difficult using your current setup. It looks as though you have 12 title properties on your document type? Creating another twelve fields for matching titles may not be the cleanest solution. It may be a better idea to allow your document to have child slide documents (which each have a title/image). It's then be far easier to loop through with XSLT and pull out these fields.
Does this make sense?
If all else fails, I wrote something similar to this but using a .NET user control - you're welcome to use it if you like..
Thanks for the reply, right ok i did think of trying to do it like that just wasnt sure how to call each individual template(child node of carousel) in the jquery? If at all possible could you post or email me your usercontrol code i wouldnt mind seing some alternatives!
Fading image carousel titles
Hi all,
I have a fading image carousel (code below) where it pulls the images from my umbraco field image1 etc, i want it to also display a title for each image also pulled from a umbraco field (title1) but am struggling!
Anyone have any suggestions??
What's actually happening, are you having trouble pulling out the images? Or is the slideshow not displaying properly?
Hi Alimac,
The images are displaying perfectly, what i want is to also display text at the bottom of each image, i have created the fields named title1 up to 10 so would like image1 to display title1 at the bottom image2 display title2 and so on?
Hopefully makes more sense!
Thanks
Pete
Hi Pete,
I think I understand what you're trying to do but it looks as though it's going to be very difficult using your current setup. It looks as though you have 12 title properties on your document type? Creating another twelve fields for matching titles may not be the cleanest solution. It may be a better idea to allow your document to have child slide documents (which each have a title/image). It's then be far easier to loop through with XSLT and pull out these fields.
Does this make sense?
If all else fails, I wrote something similar to this but using a .NET user control - you're welcome to use it if you like..
Al
Hi Alimac,
Thanks for the reply, right ok i did think of trying to do it like that just wasnt sure how to call each individual template(child node of carousel) in the jquery? If at all possible could you post or email me your usercontrol code i wouldnt mind seing some alternatives!
Cheers again
Pete
Sure, if you give me your email I'll mail it over (had a hard time trying to paste the code into the editor!).
Thanks alimac, my email is [email protected]
is working on a reply...