function tripal_core_node_view

2.x tripal_core.module tripal_core_node_view($node, $view_mode, $langcode)
3.x tripal_core.module tripal_core_node_view($node, $view_mode, $langcode)

Implements hook_node_view()

Related topics

File

tripal_core/tripal_core.module, line 606
The Tripal Core module

Code

function tripal_core_node_view($node, $view_mode, $langcode) {

  // if this node type is a chado-based node (i.e. Tripal node)
  // the we want to add a table of contents to it's content list
  // this table of contents will be an empty
  if (preg_match('/^chado_/', $node->type)) {
    // Show feature browser and counts
    if ($view_mode == 'full') {
      if (!isset($node->content['#tripal_generic_node_template'])) {
        $node->content['#tripal_generic_node_template'] = TRUE;
      }
    }
  }
}