/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function render_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 .'"><div class="field-label-inline-first">' .$title .' </div> ' ; $output .= $field[$i]['view']; $output .='</div>'; } return ($output); }
Comments
