You are here

function theme_imceimage_formatter_with_caption in Imce CCK Image 6.2

Same name and namespace in other branches
  1. 6 imceimage.module \theme_imceimage_formatter_with_caption()

Display the image as an img with caption.

File

./imceimage.module, line 419

Code

function theme_imceimage_formatter_with_caption($element) {
  $item = $element['#item'];
  $field = $element['#field_name'];
  $delta = $element['#delta'];
  $class = "imceimage-" . $field;
  if ($item['imceimage_path']) {
    $image = _imceimage_image_html($item, $class);
    $caption = $item['imceimage_alt'];
    return '<div class="image-with-caption"><div class="image">' . $image . '</div><div class="caption">' . $caption . '</div></div>';
  }
  else {
    return '';
  }
}