Darren Mothersele

London based Drupal Web Developer
Drupal.org Google+ Facebook Twitter GitHub LinkedIn RSS Feed

Lightweight Slideshow plugin for Drupal Views using jFlow

A while ago I published a Views 2 plugin on my fserver that uses the lightweight jFlow (plugin for jQuery) to make simple slideshows. You can download the module here. It's quite simple to get up and running, but I thought I would write some documentation, as there's some advanced configuration that is possible that might not be obvious...

The basic setup is to have a block that features some rotating images. To do this add a new display to a view (for example, a block, or attachment), then select jFlow as the style to use for this display. In the options for jFlow turn off display of all the controls. Set the height and width of the container, as this is a requirement of jFlow. Add an image field to the view and save.

You can create more advanced styles by using the controls. A very basic example is to have numbers that switch between the images. To do this add a views result counter to the list of fields for the view, but set it to "Exclude from display" in the field settings. Then go back to the jFlow style settings and select this field as the control. You will then see a list of numbers that you can click to change slide. If you wish you could turn off automatic transition so clicking the controls is the only way to change slide.

Another example is to use thumbnail images for the controls. You can do this by adding an imagecache preset for a tiny thumbnail, then adding this to the view as a field that is "excluded from display" then, again, selecting this as the control field in the jFlow settings.

You could also add the next/prev controls in the jFlow settings and then theme them using CSS, for example, to move the location of the controls, or display them as arrows images.

Is a demo available somewhere? Maybe host something on http://drupaldemos.org/

Good idea, I'll get a couple of demos up soon.

Thanks to help from Richard Burford at Freestyle Systems, I've now got a demo live at: http://jflow.drupaldemos.org/

Post new comment
The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Recent comments
Latest Posts