Hi All,
I am using a jquery plugin that sets the images for the slideshow in the head of the document as an array like so:
<script type="text/javascript">
var photos = [ {
"title" : "",
"image" : "Slide_1.jpg",
"url" : "#issue",
"firstline" : "",
"secondline" : ""
},
{
"title" : "",
"image" : "Slide_2.jpg",
"url" : "#mission",
"firstline" : "",
"secondline" : ""
},
{
"title" : "",
"image" : "Slide_3.jpg",
"url" : "#artists",
"firstline" : "",
"secondline" : ""
}
];
var slideshowSpeed = 6000;
</script>
I’m calling Gallery in the head of my document like so:
<script type="text/javascript">
var photos = [ [[!Gallery? &album=`[[*pagetitle]]` &thumbTpl=`HomeGalleryTpl`]] ];
var slideshowSpeed = 6000;
</script>
And HomeGalleryTpl reads:
{
"title" : "",
"image" : "[[+name]]",
"url" : "[[+url]]",
"firstline" : "",
"secondline" : ""
},
The issue is the comma at the end of each item in the array. I need to be able to specify the last item’s TPL so it doesn’t have a comma at the end, as commas at the end of arrays break the slideshow in Internet Exploder.
Is there any way of extending Gallery to include a new parameter called "FinalTpl" that can format the last item?
Let me know, thanks!