function tripal_project_node_view
2.x tripal_project.chado_node.inc | tripal_project_node_view($node, $view_mode, $langcode) |
3.x tripal_project.chado_node.inc | tripal_project_node_view($node, $view_mode, $langcode) |
Implements hook_node_view().
Related topics
File
- legacy/
tripal_project/ includes/ tripal_project.chado_node.inc, line 486 - Implement the project node content type
Code
function tripal_project_node_view($node, $view_mode, $langcode) {
switch ($node->type) {
case 'chado_project':
// Show feature browser and counts
if ($view_mode == 'full') {
$node->content['tripal_project_base'] = array(
'#theme' => 'tripal_project_base',
'#node' => $node,
'#tripal_toc_id' => 'base',
'#tripal_toc_title' => 'Overview',
'#weight' => -100,
);
$node->content['tripal_project_contact'] = array(
'#theme' => 'tripal_project_contact',
'#node' => $node,
'#tripal_toc_id' => 'contacts',
'#tripal_toc_title' => 'Contacts',
);
$node->content['tripal_project_properties'] = array(
'#theme' => 'tripal_project_properties',
'#node' => $node,
'#tripal_toc_id' => 'properties',
'#tripal_toc_title' => 'Properties',
);
$node->content['tripal_project_publications'] = array(
'#theme' => 'tripal_project_publications',
'#node' => $node,
'#tripal_toc_id' => 'publications',
'#tripal_toc_title' => 'Publications',
);
$node->content['tripal_project_relationships'] = array(
'#theme' => 'tripal_project_relationships',
'#node' => $node,
'#tripal_toc_id' => 'relationships',
'#tripal_toc_title' => 'Relationships',
);
}
if ($view_mode == 'teaser') {
$node->content['tripal_project_teaser'] = array(
'#theme' => 'tripal_project_teaser',
'#node' => $node,
);
}
break;
}
}