function tripal_library_node_view
2.x tripal_library.chado_node.inc | tripal_library_node_view($node, $view_mode, $langcode) |
3.x tripal_library.chado_node.inc | tripal_library_node_view($node, $view_mode, $langcode) |
Implements hook_node_view(). Acts on all content types
Related topics
File
- tripal_library/
includes/ tripal_library.chado_node.inc, line 530 - Implements the library node content type
Code
function tripal_library_node_view($node, $view_mode, $langcode) {
switch ($node->type) {
case 'chado_library':
if ($view_mode == 'full') {
$node->content['tripal_library_base'] = array(
'#theme' => 'tripal_library_base',
'#node' => $node,
'#tripal_toc_id' => 'base',
'#tripal_toc_title' => 'Overview',
'#weight' => -100,
);
$node->content['tripal_library_features'] = array(
'#theme' => 'tripal_library_features',
'#node' => $node,
'#tripal_toc_id' => 'features',
'#tripal_toc_title' => 'Features',
);
$node->content['tripal_library_properties'] = array(
'#theme' => 'tripal_library_properties',
'#node' => $node,
'#tripal_toc_id' => 'properties',
'#tripal_toc_title' => 'Properties',
);
$node->content['tripal_library_publications'] = array(
'#theme' => 'tripal_library_publications',
'#node' => $node,
'#tripal_toc_id' => 'publications',
'#tripal_toc_title' => 'Publications',
);
$node->content['tripal_library_references'] = array(
'#theme' => 'tripal_library_references',
'#node' => $node,
'#tripal_toc_id' => 'references',
'#tripal_toc_title' => 'Cross References',
);
$node->content['tripal_library_synonyms'] = array(
'#theme' => 'tripal_library_synonyms',
'#node' => $node,
'#tripal_toc_id' => 'synonyms',
'#tripal_toc_title' => 'Synonyms',
);
$node->content['tripal_library_terms'] = array(
'#theme' => 'tripal_library_terms',
'#node' => $node,
'#tripal_toc_id' => 'terms',
'#tripal_toc_title' => 'Annotated Terms',
);
}
if ($view_mode == 'teaser') {
$node->content['tripal_library_teaser'] = array(
'#theme' => 'tripal_library_teaser',
'#node' => $node,
);
}
break;
case 'chado_organism':
if ($view_mode == 'full') {
$node->content['tripal_organism_libraries'] = array(
'#theme' => 'tripal_organism_libraries',
'#node' => $node,
'#tripal_toc_id' => 'libraries',
'#tripal_toc_title' => 'Libraries',
);
}
break;
case 'chado_feature':
if ($view_mode == 'full') {
$node->content['tripal_feature_libraries'] = array(
'#theme' => 'tripal_feature_libraries',
'#node' => $node,
'#tripal_toc_id' => 'libraries',
'#tripal_toc_title' => 'Libraries',
);
}
break;
}
}