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.

CommentFileSizeAuthor
#3 Computed field - Display Format.png29.68 KBroball

Comments

Pedro Lozano’s picture

Status: Active » Postponed (maintainer needs more info)

Where are you putting that code? Are you using the field config textarea or are you implementing the display function in a module?

roball’s picture

Status: Postponed (maintainer needs more info) » Active

I 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.

roball’s picture

StatusFileSize
new29.68 KB

Trying to attach image again.

roball’s picture

Is there anything else I can do so you can check this issue?

roball’s picture

Any change to get this solved? Thanks for a status update.

roball’s picture

Priority: Normal » Major

Increasing priority.

Moonshine’s picture

Status: Active » Closed (fixed)

I'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.

roball’s picture

Yeah, with Computed Field 6.x-1.x-dev (2010-Mar-06) that finally works! Thank you.