function tripal_featuremap_node_view
2.x tripal_featuremap.chado_node.inc | tripal_featuremap_node_view($node, $view_mode, $langcode) |
3.x tripal_featuremap.chado_node.inc | tripal_featuremap_node_view($node, $view_mode, $langcode) |
Implements hook_node_view(). Acts on all content types.
File
- legacy/
tripal_featuremap/ includes/ tripal_featuremap.chado_node.inc, line 507 - Hooks implementing the feature map node content type
Code
function tripal_featuremap_node_view($node, $view_mode, $langcode) {
switch ($node->type) {
case 'chado_featuremap':
// Show feature browser and counts
if ($view_mode == 'full') {
$node->content['tripal_featuremap_base'] = array(
'#theme' => 'tripal_featuremap_base',
'#node' => $node,
'#tripal_toc_id' => 'base',
'#tripal_toc_title' => 'Overview',
'#weight' => -100,
);
$node->content['tripal_featuremap_featurepos'] = array(
'#theme' => 'tripal_featuremap_featurepos',
'#node' => $node,
'#tripal_toc_id' => 'featurepos',
'#tripal_toc_title' => 'Map Features',
);
$node->content['tripal_featuremap_properties'] = array(
'#theme' => 'tripal_featuremap_properties',
'#node' => $node,
'#tripal_toc_id' => 'properties',
'#tripal_toc_title' => 'Properties',
);
$node->content['tripal_featuremap_publication'] = array(
'#theme' => 'tripal_featuremap_publication',
'#node' => $node,
'#tripal_toc_id' => 'publications',
'#tripal_toc_title' => 'Publications',
);
$node->content['tripal_featuremap_references'] = array(
'#theme' => 'tripal_featuremap_references',
'#node' => $node,
'#tripal_toc_id' => 'references',
'#tripal_toc_title' => 'Cross References',
);
}
if ($view_mode == 'teaser') {
$node->content['tripal_featuremap_teaser'] = array(
'#theme' => 'tripal_featuremap_teaser',
'#node' => $node,
);
}
break;
case 'chado_feature':
if ($view_mode == 'full') {
$node->content['tripal_feature_featurepos'] = array(
'#theme' => 'tripal_feature_featurepos',
'#node' => $node,
'#tripal_toc_id' => 'featurepos',
'#tripal_toc_title' => 'Maps',
);
}
break;
}
}