function tripal_pub_node_view

2.x tripal_pub.chado_node.inc tripal_pub_node_view($node, $view_mode, $langcode)
3.x tripal_pub.chado_node.inc tripal_pub_node_view($node, $view_mode, $langcode)

Implements hook_node_view(). Acts on all content types.

Related topics

File

tripal_pub/includes/tripal_pub.chado_node.inc, line 1070
Implements Drupal Node hooks to create the chado_analysis node content type.

Code

function tripal_pub_node_view($node, $view_mode, $langcode) {
  switch ($node->type) {
    case 'chado_pub':
      // Show feature browser and counts
      if ($view_mode == 'full') {
        $node->content['tripal_pub_authors'] = array(
          '#theme' => 'tripal_pub_authors',
          '#node' => $node,
          '#tripal_toc_id' => 'authors',
          '#tripal_toc_title' => 'Author Details',
        );
        $node->content['tripal_pub_base'] = array(
          '#theme' => 'tripal_pub_base',
          '#node' => $node,
          '#tripal_toc_id' => 'base',
          '#tripal_toc_title' => 'Overview',
          '#weight' => -100,
        );
        $node->content['tripal_pub_featuremaps'] = array(
          '#theme' => 'tripal_pub_featuremaps',
          '#node' => $node,
          '#tripal_toc_id' => 'featuremaps',
          '#tripal_toc_title' => 'Maps',
        );
        $node->content['tripal_pub_features'] = array(
          '#theme' => 'tripal_pub_features',
          '#node' => $node,
          '#tripal_toc_id' => 'features',
          '#tripal_toc_title' => 'Features',
        );
        $node->content['tripal_pub_libraries'] = array(
          '#theme' => 'tripal_pub_libraries',
          '#node' => $node,
          '#tripal_toc_id' => 'libraries',
          '#tripal_toc_title' => 'Libraries',
        );
        $node->content['tripal_pub_projects'] = array(
          '#theme' => 'tripal_pub_projects',
          '#node' => $node,
          '#tripal_toc_id' => 'projects',
          '#tripal_toc_title' => 'Projects',
        );
        $node->content['tripal_pub_properties'] = array(
          '#theme' => 'tripal_pub_properties',
          '#node' => $node,
          '#tripal_toc_id' => 'properties',
          '#tripal_toc_title' => 'Properties',
        );
        $node->content['tripal_pub_references'] = array(
          '#theme' => 'tripal_pub_references',
          '#node' => $node,
          '#tripal_toc_id' => 'references',
          '#tripal_toc_title' => 'Cross References',
        );
        $node->content['tripal_pub_relationships'] = array(
          '#theme' => 'tripal_pub_relationships',
          '#node' => $node,
          '#tripal_toc_id' => 'relationships',
          '#tripal_toc_title' => 'Relationships',
        );
        $node->content['tripal_pub_stocks'] = array(
          '#theme' => 'tripal_pub_stocks',
          '#node' => $node,
          '#tripal_toc_id' => 'stocks',
          '#tripal_toc_title' => 'Stocks',
        );
      }
      if ($view_mode == 'teaser') {
        $node->content['tripal_pub_teaser'] = array(
          '#theme' => 'tripal_pub_teaser',
          '#node' => $node,
        );
      }
      break;
  }
}