Rendering Drupal 7 fields

Public

</> CopyGet raw version
php
  1. $node = node_load($nid);
  2. $image = field_get_items('node', $node, 'field_image');
  3. $output = field_view_value('node', $node, 'field_image', $image[0], array(
  4. 'type' => 'image',
  5. 'settings' => array(
  6. 'image_style' => 'thumbnail',
  7. 'image_link' => 'content',
  8. ),
  9. ));