function tripal_featuremap_nodeapi

1.x tripal_featuremap.module tripal_featuremap_nodeapi(&$node, $op, $teaser, $page)

Implementation of hook_nodeapi(). Display map information for associated features or organisms This function also provides contents for indexing

Related topics

File

tripal_featuremap/tripal_featuremap.module, line 192

Code

function tripal_featuremap_nodeapi(&$node, $op, $teaser, $page) {

  switch ($op) {
    // Note that this function only adds map view to an organism/feature
    // node.
    case 'view':
      // add the map to the organism/feature search indexing
      if ($node->build_mode == NODE_BUILD_SEARCH_INDEX) {
        $node->content['tripal_featuremap_index_version'] = array(
          '#value' => theme('tripal_featuremap_search_index', $node),
        );
      }
      elseif ($node->build_mode == NODE_BUILD_SEARCH_RESULT) {
        $node->content['tripal_featuremap_index_version'] = array(
          '#value' => theme('tripal_featuremap_search_result', $node),
        );
      }
  }
}