Re: [Thomas] Displaying single image from group
Hi Thomas,
If you look at the code generator output you'll see something like this that loops over images:
<?php foreach ($newsRecord['uploads'] as $upload): ?>
...
<?php endforeach ?>
The images are stored in $newsRecord['uploads'] and this loops over them assigning each one to $upload and displaying it.
You can assign the first image to a variable yourself like this:
<?php $firstImage = $newsRecord['uploads'][0]; ?>
Then display all the image fields just like you would inside the foreach loop. PHP starts counting some things at 0, which is why that is [0] and not [1].
Hope that helps!
Dave Edis - Senior Developer
interactivetools.com