It would be nice to have an option for allowing images to be displayed with the attached description before the user clicks the image. Ie. not only with the overlayed image which is possible now.

Comments

stella’s picture

Are you referring to use cases involving CCK imagefield?

mdez’s picture

Yes (sorry for not including in the description) - if a user has a CCK imagefield for a content type I think it would be great outputting the description alongside the imagethumbnails.

gausarts’s picture

Stella showed me somewhere in the handbook, but I forgot the link. Here's with some modifications to suit my need. This will display the description along with thumbnails and also on the lightbox. You can play around with it, don't forget to change gausarts and whatever necessary there:

<?php if ($field_image[0] != '' && !$teaser ): ?>
<div id="photo-gallery">
<?php
$thumbs_class['attributes']['class'] = 'gallery-thumbs';
foreach((array)$node->field_image as $item) {
$lightbox_preset = 'original'; 
$title = check_plain($item['data']['title']);
//$price = check_plain($item['data']['price']);
$description = check_plain($item['data']['description']);
$lightbox_path = imagecache_create_url($lightbox_preset, $item['filepath'] );
$imagecache_image = theme('imagecache', 'thumbnail', $item['filepath'], $alt = $item['filename'], $title,$thumbs_class['attributes']);
$caption = $description.'<br /><h2> '. ' GAUSARTS GALLERY </h2><p> <small>Use right and left arrows or the mouse to navigate</small></p>';
print '<div class="field-image"><a class="gallery-thumbs" title="'.$caption.'" rel="lightbox[photo_gallery]" alt="gausarts image" href="'.$lightbox_path.'">'. $imagecache_image .'</a><br />'. $description .'<br /></div>';
}
?>
<div class="clear-block"></div>
</div> <!-- #/photo-gallery -->
<?php endif; ?>

And use this css:

.field-image{float:left;margin:0 15px 40px;width:120px;/*match the width of my thumbnails*/}
.field-image img{clear:both}

Good luck!

stella’s picture

Category: feature » support
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.