function noderelationships_customize_views_node_fields in Node Relationships 6
Customize node title and body labels for fields in the main table.
1 call to noderelationships_customize_views_node_fields()
- noderelationships_customize_backref_view in ./
noderelationships.inc - Apply custom configuration to the given back reference view.
File
- ./
noderelationships.inc, line 817 - Common functions for the noderelationships module.
Code
function noderelationships_customize_views_node_fields(&$view, $display_id, $type_info) {
if ($item = $view
->get_item($display_id, 'field', 'title')) {
if ($item['table'] == 'node' && $item['relationship'] == 'none') {
$item['label'] = $type_info->title_label;
$view
->set_item($display_id, 'field', 'title', $item);
}
}
if ($referrer_type->has_body && ($item = $view
->get_item($display_id, 'field', 'body'))) {
if ($item['table'] == 'node' && $item['relationship'] == 'none') {
$item['label'] = $type_info->body_label;
$view
->set_item($display_id, 'field', 'body', $item);
}
}
}