According to Commit #448078, $node should be available to the Display format code in the current 6.x-1.x-dev (2010-Nov-09) version.
I tried it with the following Display format code:
$display = $node->nid . ' - ' . $node_field_item['value'];
but there is nothing displayed for $node->nid.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Computed field - Display Format.png | 29.68 KB | roball |
Comments
Comment #1
Pedro Lozano commentedWhere are you putting that code? Are you using the field config textarea or are you implementing the display function in a module?
Comment #2
roball commentedI put that code into the "Display Format" text area at admin/content/node-type/[my_node_type]/fields/field_shp_inst_country - see attached screenshot. The field is the "Institution country" listed at https://www.iseki-food.net/drupal/view_picam_studrev.
Edit: drupal.org's file attachment utility does not seem to function at the moment.
Comment #3
roball commentedTrying to attach image again.
Comment #4
roball commentedIs there anything else I can do so you can check this issue?
Comment #5
roball commentedAny change to get this solved? Thanks for a status update.
Comment #6
roball commentedIncreasing priority.
Comment #7
Moonshine commentedI'm guessing you're using the "plain" or "markup" display output formatter options which didn't seem to have $node pulled out of $element['#node'] for easy access. I've committed a change to the dev branch which should show up in a bit and adds $node to all the formatter options. I think that will do the trick for you. Re-open if it's still a problem using the new dev release.
Comment #8
roball commentedYeah, with Computed Field 6.x-1.x-dev (2010-Mar-06) that finally works! Thank you.