Hi,
I’m trying to implement this slideshow:
http://smoothslideshow.jondesign.net/index.html
I got everything working just fine with static HTML, but when I try to replace the array information with EE tags, it doesn’t read anymore.
There are four variables the array uses: image URL, a link the image goes to when clicked, an image title, and an image description.
I’m using Field Frame’s FFMatrix feature to give me these four variables (my field type is called {homephoto} and the four variables are self explanatory).
I’ve wrapped the repeating array code like so, assuming it will repeat for as many rows as I have in FFMatrix:
{homephoto}
mySlideData[countArticle++] = new Array(
'{site_url}{image}',
'{imagelink}',
'{image1title}',
'{imagedesc}'
);
{/homephoto}I’m getting along fine with EE but I’m afraid I’m new with JavaScript. I have added the argument to my config file to not disrupt JavaScript code to no avail. I think the problem is that JavaScript treats array information very literally, so it outputs the raw EE tags instead of letting the template read them.
I’ve tried using different encoding for the curly braces, and tried using PHP “echo” and “print” to spit out the array information, again to no avail.
Anyone have any workarounds in JavaScript that will let EE tags be read inside an array?