1
在Drupal的6,我會做下面讓圖像在我的節點 - articles.tpl.php頁:獲得在Drupal的field_image路7
<?php
$cck_images = $node->field_image;
if (count($cck_images)>0) :
foreach ($cck_images as $cck_image) :
$image = theme('imagecache', 'large', $cck_image['filepath'], $cck_image['data']['alt'], $cck_image['data']['title']);
print $image;
endforeach;
endif;
?>
然而,在Drupal 7不存在'['filepath']',我試過使用:
<?php print_r($field_image); ?>
但是變量不存在。我知道Drupal 7仍然是阿爾法,但任何幫助將不勝感激!