This post, and the many comments, has been so useful. I'm using lightbox for the images and used code from your comments. I just had to change the
<?= to <?php print from the code that was posted in order for the images to show up.
The resulting code is attached:
<?php $imagePath = $node->field_image_cache['0']['filepath']; ?> <?php if (!$node->field_image_cache == NULL) { ?><a href="<?php print base_path()?><?php print $imagePath?>" rel="lightbox[prod]"><img src="<?php print base_path()?>/sites/default/files/imagecache/product/<?php print $imagePath?>" alt="<?php print $title?>" title="<?php print $title?>" class="imagecache imagecache-product"></a><?php } ?>
<?php if (count($node->field_image_cache) > 1) { ?><ul class="other_imgs" style="list-style-type:none; margin-top:10px; text-align:center;"><?php foreach ($node->field_image_cache as $images) { if ($images['filepath'] != $imagePath) { ?> <li style="display:inline; padding:0; margin-left:0;"><a href="<?php print base_path()?><?php print $images['filepath']?>" rel="lightbox[prod]" title="<?php print $title?>"><img src="<?php print base_path()?>/sites/default/files/imagecache/uc_thumbnail/<?php print $images['filename']?>" alt="<?php print $title?>" class="imagecache imagecache-uc_thumbnail"></a> </li><?php } } ?></ul><?php } ?>
| Attachment | Size |
|---|---|
| product node lightbox.txt | 1.1 KB |
