Drupal 7 images in searchresultts


/ Published in: PHP
Save to your folder(s)

this took me forever to figure out!


Copy this code and paste it in your HTML
  1. <?php
  2. $path = image_style_url('thumbnail', $result['node']->field_cover_image['de'][0]['uri']);
  3. print theme('image', array(
  4. 'path' => $path,
  5. 'alt' => t('Home'),
  6. 'title' => t('Home')))
  7. ?>

URL: http://drupal.org/node/1047382#comment-4092634

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.