I have a Resource content type that has an image field (field type and widget are both 'image'); the standard image type. The title of this field is 'Icon' and the machine name is 'field_icon'. I created my teaser so that the title, date, image, and description fields show and customized my search-result.tpl.php and template.php files so they are displaying the teaser/snippet. That works fine.
However, now I'd like to be able to format the returned results a bit more. I see how I can put HTML directly in the .tpl file, fine. But I want to customize the image field so it appears to the LEFT (float or align left) of the other returned teaser elements.
My problem is I can't figure out how to get the variable that represents the image so I can manipulate it in my .tpl file. I tried the following, but it just returns the number to indicate there IS an image or not:
$result['node']->'field-icon';
Can someone please tell me how to get the proper variable or link to the icon itself so I can manipulate it in my .tpl file?
Thank you.
Note, here's my current search-result.tpl.php code:
<li class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php print render($title_suffix); ?>
<div class="search-snippet-info">
<?php if ($snippet): ?>
<?php print $snippet; ?>
<?php endif; ?>
</div>
</li>