API page: https://api.drupal.org/api/drupal/modules%21field%21field.module/functio...

Update documentation related to using custom formatters with field_view_field. This was difficult to find and may come up often when related to things like taxonomy.

If the custom formatter module is used something like the following must be used:

$display = array('type' => 'custom_formatters_my_formatter');
$output = field_view_field('node', $node, 'field_foo', $display);

Comments

Deciphered’s picture

Status: Active » Postponed (maintainer needs more info)

field_view_field() is a great function, very useful.... however I'm not sure what you are asking or suggesting in this issue.

Do you want me to provide documentation somewhere, change how the module works somehow, or are you just sharing this function for others who might find it useful in their own PHP custom formatters?