I try to rewrite the node output and i don`t get it. This script produce only


without any content.

$rows = array();
$cols = array();

$cols[] = '<div id="node-title">' . $node->title[0]['value'] . '</div>';

$colnum = 0;

foreach($node->field_body as $col){
  $cols[] = '<div class="description" id="description-' . $colnum . '">' . $col['value'] . '</div>';

$rows[] = array('data' => $cols);

print theme('table', $rows) 

Variables to theme functions must be named:

print theme('table', array('rows' => $rows));

See the documentation for more details.

  • thx! now, it works! – Bruno Dec 25 '13 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.