'title' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
}
], {
'padding' : 0,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'image',
'changeFade' : 0
});
});
In my xslt, I try to loop through a media folder and append each umbraco file with a delimited string. Then pass the delimited string to my javascript where I can have it split to get the path of each media item.
Loop through a media folder and pass the value using javascript
HI Guys,
I have a module that when a user clicks the gallery tab it will only show a the gallery for a specific room.
I use fancy box manual call to display the image. Using it I need to specify the image path to load it.
This is the javascript code
$(
"#manual2").click(function() {
$.fancybox([
'http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
{
'href' : 'http://farm5.static.flickr.com/4005/4213562882_851e92f326.jpg',
'title' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
}
], {
'padding' : 0,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'image',
'changeFade' : 0
});
});
In my xslt, I try to loop through a media folder and append each umbraco file with a delimited string. Then pass the delimited string to my javascript where I can have it split to get the path of each media item.
This is my xslt code
<li title="gallery" class="gallery">
<a id="gallery" >
<xsl:attribute name="href">javascript: ImageGallery('
<xsl:if test="gallery > 0">
<xsl:variable name="images" select="umbraco.library:GetMedia(gallery, 1)" />
<xsl:if test="count($images/*) > 0">
<xsl:for-each select="$images/*">
<xsl:if test="./umbracoFile != ''">
"{./umbracoFile}"|
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:if>
');</xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="contentTitle"/> Gallery</xsl:attribute>
Gallery
</a>
</li>
But I can't even get the actual path using this and I dont know how can I append the umbraco file.
Instead of
"{./umbracoFile}"|
Try:
If that doesn't work, what output DO you get?
is working on a reply...