Closed (fixed)
Project:
References
Version:
7.x-2.0-beta3
Component:
Code: node_reference
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 May 2012 at 22:14 UTC
Updated:
2 Sep 2012 at 02:19 UTC
I just need to output the title of the referanced node into a variable.
According to contemplate you can output it on the node using this:
<div class="field-item"><?php print $node->field_campaign[$node->language][0]['node']->title ?></div>
So i tried to assign it to a variable that i will later pass int a function
$campaign = $node->field_campaign[$node->language][0]['node']->title;
This will not work I get the error:
Notice: Undefined index: node in eval() (line 6 of mysite/sites/all/modules/rules/modules/php.eval.inc(146) : eval()'d code).
Notice: Trying to get property of non-object in eval() (line 6 of mysite/sites/all/modules/rules/modules/php.eval.inc(146) : eval()'d code).
I cant figure out why, can anyone help me?
Thanks
Comments
Comment #1
faqing commenteduse this code: