I'm using computed field for my content types, but when I used $node, in Display Code, it doesn't display anything :
global $node; $display_output = l("Apply", "apply_form?job_offer=".$node->nid);
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
First of all, you are supposed to write to
$entity_field['value']. Second problem is that fields operate on entities, not nodes, so you need to use
$entity instead. You can always use Devel module and
dpr($entity) to see what's in it.
node id should be in the entity field if it is a node. In which case you can load it with