Image vars
6 posts by 2 authors in: Forums > CMS Builder
Last Post: August 22, 2008 (RSS)
By jjem - August 22, 2008
I would like the record num and not the upload num, below in the bold php tag. How do I get this done? Have been searching through the posts with no success...
Thanks for your help.
(By the way, Dave, thanks for the help on the contact form issue...)
Jeremy
<?php foreach ($galleryRecords as $record): ?>
<h3><?php echo $record['title'] ?></h3>
<p>
<?php foreach ($record['pictures'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<a rel="rokbox[650 424](<?php echo $records['num']?>)" href="<?php echo $upload['urlPath'] ?>" title=""><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /></a><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php break; ?>
<?php endforeach ?></p>
Re: [oams] Image vars
By Dave - August 22, 2008
Try <?php echo $record['num'] ?> (without the s).
Let me know if that works for you.
interactivetools.com
Re: [oams] Image vars
By Dave - August 22, 2008
Try adding this debugging code below the foreach line to see what fields are available in $record:
<?php foreach ($galleryRecords as $record): ?>
<xmp><?php print_r($record); ?></xmp>
And remove it when you're done. Let me know what that shows and what the error was.
interactivetools.com
Re: [Dave] Image vars
By jjem - August 22, 2008
The fact is my gallery does not work because I have the <?php break; ?> to show only one image per record in the List.
The <a rel="rokbox[650 424] (<?php echo $record['num']?>)" was to group the rest of the pictures of each record (album) into a slideshow (mootools).
[:/]
Re: [oams] Image vars
By Dave - August 22, 2008
interactivetools.com