i have installed the views and rate module, in views-view-fields.tpl.php, i put this code in

$node=node_load($row->nid)   //$row->nid is the node's id
 echo $node->content['rate_poll']['#value'];
echo $node->title;

there is no any output of echo $node->content['rate_poll']['#value']; echo $node->title is ok. but when i echo $node->content['rate_poll']['#value']; in the node page, it can output the result. why? and how to make it can outputted in the views-view-fields.tpl.php. thank you.

Comments

dawehner’s picture

Priority: Major » Normal
Status: Active » Fixed

This is a general drupal question.

To be able to have $node->content you have to execute node_build_content

runeveryday’s picture

got it. could you tell me why i should execute node_build_content. thank you

dawehner’s picture

Because node_build_content adds $node->content to the $node.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.