function node_reference_field_formatter_info in References 7.2
Implements hook_field_formatter_info().
File
- node_reference/
node_reference.module, line 294 - Defines a field type for referencing one node from another.
Code
function node_reference_field_formatter_info() {
$ret = array(
'node_reference_default' => array(
'label' => t('Title (link)'),
'description' => t('Display the title of the referenced node as a link to the node page.'),
'field types' => array(
'node_reference',
),
),
'node_reference_plain' => array(
'label' => t('Title (no link)'),
'description' => t('Display the title of the referenced node as plain text.'),
'field types' => array(
'node_reference',
),
),
'node_reference_node' => array(
'label' => t('Rendered node'),
'description' => t('Display the referenced node in a specific view mode'),
'field types' => array(
'node_reference',
),
'settings' => array(
'node_reference_view_mode' => 'full',
),
),
'node_reference_nid' => array(
'label' => t('Node ID'),
'description' => t('Display the referenced node ID'),
'field types' => array(
'node_reference',
),
),
'node_reference_path' => array(
'label' => t('URL as plain text'),
'description' => t('Display the URL of the referenced node'),
'field types' => array(
'node_reference',
),
'settings' => array(
'alias' => TRUE,
'absolute' => FALSE,
),
),
);
return $ret;
}