function tripal_analysis_node_view
2.x tripal_analysis.chado_node.inc | tripal_analysis_node_view($node, $view_mode, $langcode) |
3.x tripal_analysis.chado_node.inc | tripal_analysis_node_view($node, $view_mode, $langcode) |
Implements hook_node_view(). Called for all node types.
Related topics
File
- tripal_analysis/
includes/ tripal_analysis.chado_node.inc, line 660 - Implements Drupal Node hooks to create the chado_analysis node content type.
Code
function tripal_analysis_node_view($node, $view_mode, $langcode) {
switch ($node->type) {
case 'chado_analysis':
// Show feature browser and counts
if ($view_mode == 'full') {
$node->content['tripal_analysis_base'] = array(
'#theme' => 'tripal_analysis_base',
'#node' => $node,
'#tripal_toc_id' => 'base',
'#tripal_toc_title' => 'Overview',
'#weight' => -100,
);
$node->content['tripal_analysis_properties'] = array(
'#theme' => 'tripal_analysis_properties',
'#node' => $node,
'#tripal_toc_id' => 'properties',
'#tripal_toc_title' => 'Properties',
);
}
if ($view_mode == 'teaser') {
$node->content['tripal_analysis_teaser'] = array(
'#theme' => 'tripal_analysis_teaser',
'#node' => $node,
);
}
break;
}
}