Hi all.
I have a view that uses two compute field CCK fields that worked just fine in Drupal 5, but are no longer working in D6. (The person that maintains the module doesn't want support requests posted to his module page.)
The real issue is that, for some reason, in the display section, I can not get the nid (as the rest of the code seems to be working after running it through deadwood).
Here is the code for the display section:
// get the nid from the URL
$course_nid = db_result(db_query("SELECT field_course_nid FROM {content_field_course} WHERE nid=%d", $node->nid));
$display = l($node_field_item['value'], 'node/' . $node->nid . $course_nid, array('attributes' => array('style' => 'color: #5b684d; font-weight: bold;')));
The $node_field_item['value'] works just fine as does the link styling.
However, the link winds up being http://mysite.com/node/ for every node. Again, for whatever reason, I'm not able to get the node ID, so the result is not surprising. In the compute section, you're required to add if (!$node->nid) node_save($node); but I can't use this in the display section, so I assume this is the problem.
Soooooo, does anyone know what I can do to make this work in my view?
Thanks in advance,
Dan