Not sure what is happening on this one. Tried 6.x 1.4, 1.5, and latest 1.dev.
I have a custom formatter for Node reference fields with the following PHP code (for advanced). Option to "Handle multiple values" is checked as this is a multi value node ref cck field.
$output = '';
foreach (element_children($element) as $key) {
$output .= $element[$key]['#item']['title'] . " # ";
}
$output = rtrim($output, " # ");
return $output;
I use it in either a page or feeds (CSV export via views bonus pack) display and I get nothing. It use to work, but for some reason - I get zero output now. Am I blind and just don't see something silly? Same issue as this post perhaps? http://drupal.org/node/1147156
Any thoughts, or assistance would be super helpful. Ultimate goal is to provide a semi nice formatted multivalue node ref field for a CSV export on par with this post (http://drupal.org/node/938140). If there are other means for making this happen...
Comments
Comment #1
decipheredHi clintthayer,
A Node reference field only returns a NID, not a title. If you want the title of the reference node you will need to get it via a node_load() of the referenced NID.
Otherwise the code works perfectly.
Sorry for the late response.
Cheers,
Deciphered.