Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.12
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2011 at 09:21 UTC
Updated:
26 Apr 2011 at 14:51 UTC
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
Comment #1
dawehnerThis is a general drupal question.
To be able to have $node->content you have to execute node_build_content
Comment #2
runeveryday commentedgot it. could you tell me why i should execute node_build_content. thank you
Comment #3
dawehnerBecause node_build_content adds $node->content to the $node.