I have a view in drupal 7 and I have created a template of this view. Now I need to call image here.
<div class="attachment-property-thumb"> <?php print $fields["field_real_thumbnail"]->content; ?> </div>
If you have multiple images, please make changes from view to display only single image as shown in attached file.
Please use below code snippet in your view tpl file.
$fid = file_id_from_your_view $file = file_load($fid); $img_url = $file->uri; // Path for your image with specific style $style_image = image_style_url('your_image_style_to_display', $img_url);
Hope this helps you!
You need to do field level theming.
Create a template file having name like:
drupal_set_message('<pre>' . print_r(array_keys($fields), TRUE) . '</pre>');