Another custom gallery question

4 posts by 2 authors in: Forums > CMS Builder
Last Post: May 15, 2013   (RSS)

By meg - May 13, 2013

I'm creating another custom gallery for a different client. Essentially, I need to have an numeric value associated with images (sequentially in an uploads section) in an individual listing page to create a link that automates previous and next buttons. (I would just use the previous and next buttons from the gallery javascript, but they're already being used elsewhere on the page and can't be duplicated. My client wants redundancy.)

The link I'm trying to achieve is such:

javascript:featuredcontentslider.jumpTo('article', 1)

The number at the end is what I need to change based on the image previous and next in the upload section in the CMS.

Here is the full script for the image so you see what I mean. I tried using a index-1, index+1 but I don't have a record to associate it with. I would appreciate your help with this - thank you!

<?php foreach ($articlesRecord['images'] as $index => $upload): ?>
<!-- GALLERY IMAGE--><div class="contentdiv">

<!-- LEFT ARROW --><div class="arrow-left"><a href="javascript:featuredcontentslider.jumpTo('article', 1)"><img src="images/arrow-left.png" width="11" height="14" alt="&lt;" /></a></div>

<!-- IMAGE --><div class="article-image" style="background: url(<?php echo $upload['urlPath'] ?>) top left no-repeat;"></div>

<!-- RIGHT ARROW --><div class="arrow-right"><a href="javascript:featuredcontentslider.jumpTo('article', 2)" class="next"><img src="images/arrow-right.png" width="11" height="14" alt="&gt;" /></a></div>

</div><!-- END GALLERY IMAGE -->
<?php endforeach ?>

By gregThomas - May 14, 2013

Hi Meg,

I think I'm going to need a bit more information before I can make a suggestion.

Is this one record with multiple uploads, or is it a multiple record section with each record having one upload to it? Are you implementing a particular jQuery or JavaScript slideshow system, or is this one you've written yourself?  How does the system select an image/section record to display within the slideshow?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By meg - May 14, 2013

The is one entry in a multi-listing section, with one upload record where multiple images are uploaded. I need to designate a numeric system (based on order) of these image uploads. 

Here's the javascript I'm using: http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

Since I'm already using the prev, next and increment buttons elsewhere, and need another prev and next button, I'm using the direct link javascript they suggest.