Created
June 14, 2013 12:31
-
-
Save mynameispj/5781449 to your computer and use it in GitHub Desktop.
Drupal 7, print images from a node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$person = node_load($person_nid); | |
$image = field_get_items('node', $person, 'field_image'); | |
foreach ($image as $key=>$value) { | |
$output = field_view_value('node', $person, 'field_image', $image[$key], array( | |
'type' => 'image', | |
'settings' => array( | |
'image_style' => 'thumbnail', //place your image style here | |
'image_link' => 'content', | |
), | |
)); | |
print render($output); | |
} | |
// http://www.wootenswebdesign.com/loop-through-multiple-image-fields-drupal-7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment