Hi, I'm working on a theme and I need some help.
I have 6 pages and 6 albums. What I want to do is, for example, on my page "Football" I want a slideshow that shows random images of the "Football" album.
I thought on something like:
`
<?php getCodeblock(); ?>
<?php printPageContent();?>
`
and then add a function with the album as argument on the codeblock of each page to show the slideshow.
Can someone help me and tell me how to get this done exactly? thanks
Comments
You can call our slideshow (jquery cycle mode) on any other page direclty by placing the function and passing an albumobject to it. It has also a parameter for shuffle/random order. See the documentation. If your want only a specific number of random images you have to built your own using the jquery cycle script.
This is the code (I know it shows the same album on every page, it's just a test):
`
<?php $albumobject = new Album($_zp_gallery,"football"); ?>
<?php printSlideShow(false, false, $albumobject, "", 900, 360, true, true); ?>
<?php set_context(ZP_ZENPAGE_PAGE); ?>
<?php printPageContent();?>
`
And this on the head: <?php printSlideShowJS() ?>
In my theme the slideshow is displayed twice and it's just 2 static images. As I said, I've tried that code on another theme and the slideshow works perfectly.
Also, how can I show the controls to go to the previous/next image manually?
`this at all.
The controls are an option of the plugin. Those are global for all slideshows but you could override that with the function `setOption()`(please see doc for info and the plugin for the option name).
Beside that you can always built your own complete custom slideshow manually using all the jQuery Cycle plugin provides: http://http//www.malsup.com/jquery/cycle/
I just realized I'm getting an error message on firebug: Uncaught TypeError: Object [object Object] has no method 'cycle'. That's because it's not loading the .js right?
Alternatively just add the js manually to the page header:
`/slideshow/jquery.cycle.all.js">`
That's what we actually do on our own front page.