/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function render_image_field($node,$name,$title=null,$divclass=null,$limit=0,$start=0) { $field_name = 'field_'.$name; $field = $node->{$field_name}; for ($i=$start; $i < $limit; $i++) { $output .= '<div class="field field-item'. ' '.$divclass .'"> ' ; $output .= $field[$i]['view']; $output .= '<span>' .$field[$i]['data']['description'] .'</span>'; $output .='</div>'; } return ($output); }