Is there a way to show a caption to each image in image_cycle as they cycle, based on the title given to the image on upload?
Drupal6, Image_cycle 6.x-1.1, Jquery.cycle.min.js.

Many thanks.

Comments

tony@faithfull.id.au’s picture

Status: Active » Closed (works as designed)

Solved this for myself eventually.

1. Create a container for the caption.

In Administer->Site Building->Blocks->Image Cycle->configure, I put the following code:

<div style="text-align: center;margin-left:0px;">
<?php
echo image_cycle_show(8);
?>
<p id="slide-show-caption"></p>
</div>

2. Define a function for the 'after' parameter to populate the container with the appropriate caption text, in this case from the alt attribute of the image.

In Administer->Content Management->Image Galleries->[your gallery]->edit gallery->Cycle Settings Parameters, I put the following parameter:

after: function() {$('#slide-show-caption').html(this.alt); }