Browse Source

Changed node_view array element from '#value' to '#markup'. Node template now handles teasers properly as well as CCK elements added to a page

Stephen Ficklin 11 years ago
parent
commit
50a55700b1

+ 3 - 3
tripal_analysis/includes/tripal_analysis.chado_node.inc

@@ -594,19 +594,19 @@ function tripal_analysis_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_analysis_base'] = array(
-          '#value' => theme('tripal_analysis_base', array('node' => $node)),
+          '#markup' => theme('tripal_analysis_base', array('node' => $node)),
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
         );
         $node->content['tripal_analysis_properties'] = array(
-          '#value' => theme('tripal_analysis_properties', array('node' => $node)),
+          '#markup' => theme('tripal_analysis_properties', array('node' => $node)),
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_analysis_teaser'] = array(
-          '#value' => theme('tripal_analysis_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_analysis_teaser', array('node' => $node)),
         );
       }
       break;

+ 5 - 5
tripal_contact/includes/tripal_contact.chado_node.inc

@@ -553,30 +553,30 @@ function tripal_contact_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_contact_base'] = array(
-          '#value' => theme('tripal_contact_base', array('node' => $node)),
+          '#markup' => theme('tripal_contact_base', array('node' => $node)),
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
           '#weight' => 0,
         );
         $node->content['tripal_contact_properties'] = array(
-          '#value' => theme('tripal_contact_properties', array('node' => $node)),
+          '#markup' => theme('tripal_contact_properties', array('node' => $node)),
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
         $node->content['tripal_contact_publications'] = array(
-          '#value' => theme('tripal_contact_publications', array('node' => $node)),
+          '#markup' => theme('tripal_contact_publications', array('node' => $node)),
           '#tripal_toc_id'    => 'publications',
           '#tripal_toc_title' => 'Publications',
         );
         $node->content['tripal_contact_relationships'] = array(
-          '#value' => theme('tripal_contact_relationships', array('node' => $node)),
+          '#markup' => theme('tripal_contact_relationships', array('node' => $node)),
           '#tripal_toc_id'    => 'relationships',
           '#tripal_toc_title' => 'Relationships',
         );
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_contact_teaser'] = array(
-          '#value' => theme('tripal_contact_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_contact_teaser', array('node' => $node)),
         );
       }
       break;

+ 56 - 72
tripal_core/theme/node--chado-generic.tpl.php

@@ -1,77 +1,61 @@
 <?php
-// Purpose: This template provides a generic layout for all Tripal nodes (page)
 
-// get the template type of node (e.g. if type == chado_organism then template type == organism)
-$node_type = $variables['type']; ?>
-
-<script type="text/javascript">
-(function ($) {
-  Drupal.behaviors.<?php print $node_type?>Behavior = {
-    attach: function (context, settings){ 
-      // hide all but the first data block 
-      $(".tripal-data-block").hide().filter(":first-child").show();
- 
-      // when a title in the table of contents is clicked, then 
-      // show the corresponding item in the details box 
-      $(".tripal_toc_list_item_link").click(function(){
-        var id = $(this).attr('id') + "-tripal-data-block";
-        $(".tripal-data-block").hide().filter("#"+ id).show();
-        return false;
-      }); 
-
-      // if a ?block= is specified in the URL then we want to show the
-      // requested block
-      var block = window.location.href.match(/[\?|\&]block=(.+?)\&/)
-      if(block == null){
-        block = window.location.href.match(/[\?|\&]block=(.+)/)
-      }
-      if(block != null){
-        $(".tripal-data-block").hide().filter("#" + block[1] + "-tripal-data-block").show();
-      }
-    }
-  };
-})(jQuery);
-</script>
-
-<div id="tripal_<?php print $node_type?>_content" class="tripal-contents"> 
-  <table id="tripal-contents-table">
-    <tr class="tripal-contents-table-tr">
-      <td nowrap class="tripal-contents-table-td tripal-contents-table-td-toc"  align="left"><?php
-        print $content['tripal_toc']['#value'] ?>
+if($teaser) {
+  print render($content);
+}
+else { 
+  $node_type = $node->type; ?>
+  
+  <script type="text/javascript">
+    (function ($) {
+      Drupal.behaviors.<?php print $node_type?>Behavior = {
+        attach: function (context, settings){ 
+          // hide all but the first data block 
+          $(".tripal-data-block").hide().filter(":first-child").show();
+     
+          // when a title in the table of contents is clicked, then 
+          // show the corresponding item in the details box 
+          $(".tripal_toc_list_item_link").click(function(){
+            var id = $(this).attr('id') + "-tripal-data-block";
+            $(".tripal-data-block").hide().filter("#"+ id).show();
+            return false;
+          }); 
+    
+          // if a ?block= is specified in the URL then we want to show the
+          // requested block
+          var block = window.location.href.match(/[\?|\&]block=(.+?)\&/)
+          if(block == null){
+            block = window.location.href.match(/[\?|\&]block=(.+)/)
+          }
+          if(block != null){
+            $(".tripal-data-block").hide().filter("#" + block[1] + "-tripal-data-block").show();
+          }
+        }
+      };
+    })(jQuery);
+  </script>
+  
+  <div id="tripal_<?php print $node_type?>_content" class="tripal-contents"> 
+    <table id="tripal-contents-table">
+      <tr class="tripal-contents-table-tr">
+        <td nowrap class="tripal-contents-table-td tripal-contents-table-td-toc"  align="left"><?php
+        
+          // print the table of contents. It's found in the content array 
+          print $content['tripal_toc']['#markup'];
+          
+          // remove the table of contents so it doesn't show up in the 
+          // data section with the $content array is rendered
+          unset($content['tripal_toc']); ?>
           
-          <!-- Resource Links CCK elements --><?php
-          if(property_exists($node, 'field_resource_links')) {
-            for($i = 0; $i < count($node->field_resource_links); $i++){
-              if($node->field_resource_links[$i]['value']){
-                $matches = preg_split("/\|/",$node->field_resource_links[$i]['value']);?>
-                <li><a href="<?php print $matches[1] ?>" target="_blank"><?php print $matches[0] ?></a></li><?php
-              }
-            }
-          } ?> 
-      </td>
-      <td class="tripal-contents-table-td-data" align="left" width="100%">
-         <!-- Resource Blocks CCK elements --> <?php
-         if (property_exists($node, 'field_resource_titles')) {
-           for ($i = 0; $i < count($node->field_resource_titles); $i++){
-             if ($node->field_resource_titles[$i]['value']){ ?>
-               <div id="tripal_<?php print $node_type?>-resource_<?php print $i?>-box" class="tripal_<?php print $node_type?>-info-box tripal-info-box">
-                 <div class="tripal_<?php print $node_type?>-info-box-title tripal-info-box-title"><?php print $node->field_resource_titles[$i]['value'] ?></div>
-                 <?php print $node->field_resource_blocks[$i]['value']; ?>
-               </div> <?php
-             }
-           } 
-         }?>
-         <!-- Let modules add more content -->
-         <?php
-           foreach ($content as $key => $values) {
-             if (array_key_exists('#value', $values) and $key != 'tripal_toc') {
-               print $content[$key]['#value'];
-             }
-           }
-         ?>
-      </td>
-    </tr>
-  </table>
-</div> 
+        </td>
+        <td class="tripal-contents-table-td-data" align="left" width="100%"> <?php
+         
+          // print the rendered content 
+          print render($content); ?>
+        </td>
+      </tr>
+    </table>
+  </div> <?php 
+}
 
 

+ 79 - 28
tripal_core/tripal_core.module

@@ -552,47 +552,82 @@ function tripal_core_views_api() {
  */
 function tripal_core_node_view_alter(&$build) {
   global $theme;
+  
+  // if the $build['tripal_toc'] element is not present, then this is not
+  // a full node view so we do not want to alter 
+  if (!array_key_exists('tripal_toc', $build)) {
+    return;
+  }
 
   $cache = cache_get("theme_registry:$theme", 'cache');
   $node = $build['#node'];
   $toc = array();
   $toc_html = '';
   
-  //dpm($build);
-  
   // if we are looking at a Tripal node template then we want to
   // make some changes to each block of content so that we can associate
   // a table of contents and add administrator and curator messages
   if (preg_match('/chado_/', $node->type)) {
 
     // iterate through all the elements of the $build array and for those
-    // with a '#value' add some extra <div> tags
+    // that are wanting to provide content for this node
+    $markup_list = array();
     foreach ($build as $key => $value) {
 
-      // only examine elements without a '#' prefix and that are not the
-      // tripal table of contents and that have a #value element
-      if (!preg_match('/^#/', $key) and $key != 'tripal_toc' and
-          array_key_exists('#value', $build[$key]) and trim($build[$key]['#value'])) {
+      // examine elements without a '#' prefix as these should be adding 
+      // contents to the page. Skip the table of contents and any teasers
+      if (!preg_match('/^#/', $key) and $key != 'tripal_toc') {
         
+        // find the markup. Some fields will have a '#markup' and others, such
+        // as CCK elements may have a set of '#markup' elements organized by 
+        // numerical keys. 
+        if (array_key_exists('#markup', $build[$key]) and trim($build[$key]['#markup'])) {
+          $markup_list[$key][] = $build[$key]['#markup'];
+        }
+        // For backwards copmatibility we should support the '#value' element as well.
+        elseif (array_key_exists('#value', $build[$key]) and trim($build[$key]['#value'])) {
+          $markup_list[$key][] = $build[$key]['#markup'];
+        }
+        else {
+          // we don't have a '#markup' field so look to see if this is a CCK
+          // element with numerical fields and a '#markup' inside
+          foreach ($value as $subkey => $subvalue) {
+            if (is_array($subvalue) and array_key_exists('#markup', $value[$subkey]) and trim($value[$subkey]['#markup'])) {
+              $markup_list[$key][] = $value[$subkey]['#markup'];
+            }
+          }
+        }
+      }
+    }
+
+    // if we have markup for this node then format it for display with Tripal
+    // basically, we just wrap it with a container, give it a title, and
+    // build the table of contents for the page.  The user theme can handle
+    // how to display it.  The default tripal node template will handle it 
+    // by default.
+    foreach ($markup_list as $key => $markup) {
+      foreach ($markup as $i => $html_text) {
+        $is_teaser = FALSE;
+
         // intialize the item title, key and id
         $toc_item_title = $key;
         $toc_item_id    = $key;
         $toc_item_link  = '';
         
-        
         // BUILD THE TEMPLATE PATH
         // get the template path so we can put it in an admin message box
         $path = '';
         if (array_key_exists($key, $cache->data) and array_key_exists('path', $cache->data[$key])) {
         
           $path = $cache->data[$key]['path'] . '/' . $key . '.tpl.php';
+          
           $path = theme('tripal_admin_message', array('message' => "Administrators, you can
-          customize the way the content above is presented.  Tripal provides a template
-          file for each block of content.  To customize, copy the template file to your
-          site's default theme, edit then " .
+            customize the way the content above is presented.  Tripal provides a template
+            file for each block of content.  To customize, copy the template file to your
+            site's default theme, edit then " .
             l('clear the Drupal cache', 'admin/config/development/performance', array('attributes' => array('target' => '_blank'))) . ".
-            Currently, the content above is provided by this template: <br><br>$path
-            "));
+            Currently, the content above is provided by this template: <br><br>$path")
+          );
         }
   
         // BUILD THE TOC LINKS
@@ -604,6 +639,14 @@ function tripal_core_node_view_alter(&$build) {
         if (array_key_exists('#tripal_toc_id', $build[$key])) {
           $toc_item_id = $build[$key]['#tripal_toc_id'];
         }
+        
+        // for any content items that have more than one entry (such
+        // as CCK fields with unlimited values, we want to add the index to the
+        // id 
+        if($i > 0) {
+          $toc_item_id .= '-' . $i;
+          $toc_item_title .= '-' . $i;
+        }
         $toc_item_link = "<div class=\"tripal_toc_list_item\"><a id=\"$toc_item_id\" class=\"tripal_toc_list_item_link\" href=\"?block=$toc_item_id\">$toc_item_title</a></div>";
         
         // next check the database. If the title has been overridden then 
@@ -613,31 +656,39 @@ function tripal_core_node_view_alter(&$build) {
           $weight = $build[$key]['#weight'];
         }
         $toc[$weight][] = $toc_item_link;
-        
-        
+    
         // CREATE THE DATA BLOCK
         // add a surrounding <div> box around the content
-        $build[$key]['#value'] = "
+        $updated_markup = "
           <div id=\"$toc_item_id-tripal-data-block\" class=\"tripal-data-block\">
-            <div class=\"$toc_item_id-tripal-data-block-title tripal-data-block-title\">$toc_item_title</div> " .
-              $build[$key]['#value'] . "
+            <div class=\"$toc_item_id-tripal-data-block-title tripal-data-block-title\">$toc_item_title</div>  
+              $html_text  
               $path 
             </div>
           </div>
         ";
+        
+        // subtitute back in the #markup into the correct field.
+        if (array_key_exists($i, $build[$key])) {
+          $build[$key][$i]['#markup'] = $updated_markup;
+        }
+        else {
+          $build[$key]['#markup'] = $updated_markup;
+        }
       }
     }
-    
-    // BUILD THE TABLE OF CONTENTS LINKS
-    $toc_html = '';
-    ksort($toc, SORT_NUMERIC);
-    foreach ($toc as $weight => $links) {
-      foreach ($links as $index => $toc_item_link) {
-        $toc_html .= $toc_item_link;
-      }
+  }
+  
+  // BUILD THE TABLE OF CONTENTS LINKS
+  $toc_html = '';
+  ksort($toc, SORT_NUMERIC);
+  foreach ($toc as $weight => $links) {
+    foreach ($links as $index => $toc_item_link) {
+      $toc_html .= $toc_item_link;
     }
-    $build['tripal_toc']['#value'] = "<div id=\"$node->type-tripal-toc-block\" class=\"tripal-toc-block\">$toc_html</div>";
   }
+  $build['tripal_toc']['#markup'] = "<div id=\"$node->type-tripal-toc-block\" class=\"tripal-toc-block\">$toc_html</div>";
+  
   //dpm($cache);
   //dpm($build);
 }
@@ -655,7 +706,7 @@ function tripal_core_node_view($node, $view_mode, $langcode) {
     // Show feature browser and counts
     if ($view_mode == 'full') {
       $node->content['tripal_toc'] = array(
-        '#value' => "<div id=\"$node->type-tripal-toc-block\" class=\"tripal-toc-block\"></div>",
+        '#markup' => "<div id=\"$node->type-tripal-toc-block\" class=\"tripal-toc-block\"></div>",
       );
     }
   }

+ 4 - 4
tripal_example/includes/tripal_example.chado_node.inc

@@ -579,24 +579,24 @@ function tripal_example_node_view($node, $view_mode, $langcode) {
         // there is always a base template.  This is the template that
         // is first shown when the example node type is first displayed
         //$node->content['tripal_example_base'] = array(
-        //  '#value' => theme('tripal_example_base', array('node' => $node)),
+        //  '#markup' => theme('tripal_example_base', array('node' => $node)),
         //  '#tripal_toc_id'    => 'base',
         //  '#tripal_toc_title' => 'Details',
         //);
 
         // we can add other templates as well.
         //$node->content['tripal_example_properties'] = array(
-        //  '#value' => theme('tripal_example_properties', array('node' => $node)),
+        //  '#markup' => theme('tripal_example_properties', array('node' => $node)),
         //  '#tripal_toc_id'    => 'properties',
         //  '#tripal_toc_title' => 'Properties',
         //);
         //$node->content['tripal_example_publications'] = array(
-        //  '#value' => theme('tripal_example_publications', array('node' => $node)),
+        //  '#markup' => theme('tripal_example_publications', array('node' => $node)),
         //  '#tripal_toc_id'    => 'publications',
         //  '#tripal_toc_title' => 'Publications',
         //);
         //$node->content['tripal_example_references'] = array(
-        //  '#value' => theme('tripal_example_references', array('node' => $node)),
+        //  '#markup' => theme('tripal_example_references', array('node' => $node)),
         //  '#tripal_toc_id'    => 'references',
         //  '#tripal_toc_title' => 'Cross References',
         //);

+ 14 - 14
tripal_feature/includes/tripal_feature.chado_node.inc

@@ -762,65 +762,65 @@ function tripal_feature_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_feature_base'] = array(
-          '#value' => theme('tripal_feature_base', array('node' => $node)),
+          '#markup' => theme('tripal_feature_base', array('node' => $node)),
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
           '#weight' => 0,
         );
         $node->content['tripal_feature_alignments'] = array(
-          '#value' => theme('tripal_feature_alignments', array('node' => $node)),
+          '#markup' => theme('tripal_feature_alignments', array('node' => $node)),
           '#tripal_toc_id'    => 'alignments',
           '#tripal_toc_title' => 'Alignments',
         );
         $node->content['tripal_feature_analyses'] = array(
-          '#value' => theme('tripal_feature_analyses', array('node' => $node)),
+          '#markup' => theme('tripal_feature_analyses', array('node' => $node)),
           '#tripal_toc_id'    => 'analyses',
           '#tripal_toc_title' => 'Analyses',
         );
         $node->content['tripal_feature_featurepos'] = array(
-          '#value' => theme('tripal_feature_featurepos', array('node' => $node)),          
+          '#markup' => theme('tripal_feature_featurepos', array('node' => $node)),          
           '#tripal_toc_id'    => 'featurepos',
           '#tripal_toc_title' => 'Maps',
         );
         $node->content['tripal_feature_properties'] = array(
-          '#value' => theme('tripal_feature_properties', array('node' => $node)),
+          '#markup' => theme('tripal_feature_properties', array('node' => $node)),
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
         $node->content['tripal_feature_publications'] = array(
-          '#value' => theme('tripal_feature_publications', array('node' => $node)),
+          '#markup' => theme('tripal_feature_publications', array('node' => $node)),
           '#tripal_toc_id'    => 'publications',
           '#tripal_toc_title' => 'Publications',
         );
         $node->content['tripal_feature_references'] = array(
-          '#value' => theme('tripal_feature_references', array('node' => $node)),
+          '#markup' => theme('tripal_feature_references', array('node' => $node)),
           '#tripal_toc_id'    => 'references',
           '#tripal_toc_title' => 'Cross References',
         );
         $node->content['tripal_feature_relationships'] = array(
-          '#value' => theme('tripal_feature_relationships', array('node' => $node)),
+          '#markup' => theme('tripal_feature_relationships', array('node' => $node)),
           '#tripal_toc_id'    => 'relationships',
           '#tripal_toc_title' => 'Relationships',
         );
         $node->content['tripal_feature_seqence'] = array(
-          '#value' => theme('tripal_feature_sequence', array('node' => $node)),
+          '#markup' => theme('tripal_feature_sequence', array('node' => $node)),
           '#tripal_toc_id'    => 'sequence',
           '#tripal_toc_title' => 'Sequence',
         );
         $node->content['tripal_feature_synonyms'] = array(
-          '#value' => theme('tripal_feature_synonyms', array('node' => $node)),
+          '#markup' => theme('tripal_feature_synonyms', array('node' => $node)),
           '#tripal_toc_id'    => 'synonyms',
           '#tripal_toc_title' => 'Synonyms',
         );
         $node->content['tripal_feature_terms'] = array(
-          '#value' => theme('tripal_feature_terms', array('node' => $node)),
+          '#markup' => theme('tripal_feature_terms', array('node' => $node)),
           '#tripal_toc_id'    => 'terms',
           '#tripal_toc_title' => 'Annotated Terms',
         );
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_feature_teaser'] = array(
-          '#value' => theme('tripal_feature_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_feature_teaser', array('node' => $node)),
         );
       }
       break;
@@ -828,12 +828,12 @@ function tripal_feature_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_organism_feature_counts'] = array(
-          '#value' => theme('tripal_organism_feature_counts', array('node' => $node)),
+          '#markup' => theme('tripal_organism_feature_counts', array('node' => $node)),
           '#tripal_toc_id'    => 'feature_counts',
           '#tripal_toc_title' => 'Data Type Summary',
         );
         $node->content['tripal_organism_feature_browser'] = array(
-          '#value' => theme('tripal_organism_feature_browser', array('node' => $node)),
+          '#markup' => theme('tripal_organism_feature_browser', array('node' => $node)),
           '#tripal_toc_id'    => 'feature_browser',
           '#tripal_toc_title' => 'Feature Browser',
         );

+ 6 - 6
tripal_featuremap/includes/tripal_featuremap.chado_node.inc

@@ -445,35 +445,35 @@ function tripal_featuremap_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_featuremap_base'] = array(
-          '#value' => theme('tripal_featuremap_base', array('node' => $node)),
+          '#markup' => theme('tripal_featuremap_base', array('node' => $node)),
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
           '#weight' => 0,
         );
         $node->content['tripal_featuremap_featurepos'] = array(
-          '#value' => theme('tripal_featuremap_featurepos', array('node' => $node)),
+          '#markup' => theme('tripal_featuremap_featurepos', array('node' => $node)),
           '#tripal_toc_id'    => 'featurepos',
           '#tripal_toc_title' => 'Map Features',
         );
         $node->content['tripal_featuremap_properties'] = array(
-          '#value' => theme('tripal_featuremap_properties', array('node' => $node)),
+          '#markup' => theme('tripal_featuremap_properties', array('node' => $node)),
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
         $node->content['tripal_featuremap_publication'] = array(
-          '#value' => theme('tripal_featuremap_publication', array('node' => $node)),
+          '#markup' => theme('tripal_featuremap_publication', array('node' => $node)),
           '#tripal_toc_id'    => 'publications',
           '#tripal_toc_title' => 'Publications',
         );
         $node->content['tripal_featuremap_references'] = array(
-          '#value' => theme('tripal_featuremap_references', array('node' => $node)),
+          '#markup' => theme('tripal_featuremap_references', array('node' => $node)),
           '#tripal_toc_id'    => 'references',
           '#tripal_toc_title' => 'Cross References',
         );
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_featuremap_teaser'] = array(
-          '#value' => theme('tripal_featuremap_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_featuremap_teaser', array('node' => $node)),
         );
       }
       break;

+ 2 - 2
tripal_genetic/tripal_genetic.module

@@ -123,7 +123,7 @@ function tripal_genetic_node_view($node, $view_mode, $langcode) {
       // template from this module as the ND module would superceed this.
       if (!array_key_exists('tripal_feature_nd_genotypes', $node->content)) {
         $node->content['tripal_feature_genotypes'] = array(
-          '#value' => theme('tripal_feature_genotypes', array('node' => $node)),
+          '#markup' => theme('tripal_feature_genotypes', array('node' => $node)),
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );
@@ -138,7 +138,7 @@ function tripal_genetic_node_view($node, $view_mode, $langcode) {
       // template from this module as the ND module would superceed this.
       if (!array_key_exists('tripal_stock_nd_genotypes', $node->content)) {
         $node->content['tripal_stock_genotypes'] = array(
-          '#value' => theme('tripal_stock_genotypes', array('node' => $node)),
+          '#markup' => theme('tripal_stock_genotypes', array('node' => $node)),
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );

+ 9 - 9
tripal_library/includes/tripal_library.chado_node.inc

@@ -390,47 +390,47 @@ function tripal_library_node_view($node, $view_mode, $langcode) {
     case 'chado_library':
       if ($view_mode == 'full') {
         $node->content['tripal_library_base'] = array(
-          '#value' => theme('tripal_library_base', array('node' => $node)),
+          '#markup' => theme('tripal_library_base', array('node' => $node)),
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
           '#weight' => 0,
         );
         $node->content['tripal_library_properties'] = array(
-          '#value' => theme('tripal_library_properties', array('node' => $node)),
+          '#markup' => theme('tripal_library_properties', array('node' => $node)),
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
         $node->content['tripal_library_publications'] = array(
-          '#value' => theme('tripal_library_publications', array('node' => $node)),
+          '#markup' => theme('tripal_library_publications', array('node' => $node)),
           '#tripal_toc_id'    => 'publications',
           '#tripal_toc_title' => 'Publications',
         );
         $node->content['tripal_library_references'] = array(
-          '#value' => theme('tripal_library_references', array('node' => $node)),
+          '#markup' => theme('tripal_library_references', array('node' => $node)),
           '#tripal_toc_id'    => 'references',
           '#tripal_toc_title' => 'References',
         );
         $node->content['tripal_library_synonyms'] = array(
-          '#value' => theme('tripal_library_synonyms', array('node' => $node)),
+          '#markup' => theme('tripal_library_synonyms', array('node' => $node)),
           '#tripal_toc_id'    => 'synonyms',
           '#tripal_toc_title' => 'Synonyms',
         );
         $node->content['tripal_library_terms'] = array(
-          '#value' => theme('tripal_library_terms', array('node' => $node)),
+          '#markup' => theme('tripal_library_terms', array('node' => $node)),
           '#tripal_toc_id'    => 'terms',
           '#tripal_toc_title' => 'Annotated Terms',
         );
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_library_teaser'] = array(
-          '#value' => theme('tripal_library_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_library_teaser', array('node' => $node)),
         );
       }
       break;
     case 'chado_organism':
       if ($view_mode == 'full') {
         $node->content['tripal_organism.libraries'] = array(
-          '#value' => theme('tripal_organism.libraries', array('node' => $node)),
+          '#markup' => theme('tripal_organism.libraries', array('node' => $node)),
           '#tripal_toc_id'    => 'libraries',
           '#tripal_toc_title' => 'Libraries',
         );
@@ -439,7 +439,7 @@ function tripal_library_node_view($node, $view_mode, $langcode) {
     case 'chado_feature':
       if ($view_mode == 'full') {
         $node->content['tripal_feature.libraries'] = array(
-          '#value' => theme('tripal_feature.libraries', array('node' => $node)),
+          '#markup' => theme('tripal_feature.libraries', array('node' => $node)),
           '#tripal_toc_id'    => 'libraries',
           '#tripal_toc_title' => 'Libraries',
         );

+ 3 - 3
tripal_natural_diversity/tripal_natural_diversity.module

@@ -174,7 +174,7 @@ function tripal_natural_diversity_node_view($node, $view_mode, $langcode) {
           unset($node->content['tripal_feature_genotypes']);
         }
         $node->content['tripal_feature_nd_genotypes'] = array(
-          '#value' => theme('tripal_feature_nd_genotypes', array('node' => $node)),
+          '#markup' => theme('tripal_feature_nd_genotypes', array('node' => $node)),
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );
@@ -189,12 +189,12 @@ function tripal_natural_diversity_node_view($node, $view_mode, $langcode) {
           unset($node->content['tripal_stock_genotypes']);
         }
         $node->content['tripal_stock_nd_genotypes'] = array(
-          '#value' => theme('tripal_stock_nd_genotypes', array('node' => $node)),
+          '#markup' => theme('tripal_stock_nd_genotypes', array('node' => $node)),
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );
         $node->content['tripal_stock_nd_phenotypes'] = array(
-          '#value' => theme('tripal_stock_nd_phenotypes', array('node' => $node)),
+          '#markup' => theme('tripal_stock_nd_phenotypes', array('node' => $node)),
           '#tripal_toc_id'    => 'phenotypes',
           '#tripal_toc_title' => 'Phenotypes',
         );

+ 2 - 2
tripal_organism/includes/tripal_organism.chado_node.inc

@@ -436,7 +436,7 @@ function tripal_organism_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_organism_base'] = array(
-          '#value'  => theme('tripal_organism_base', array('node' => $node)),
+          '#markup'  => theme('tripal_organism_base', array('node' => $node)),
           '#weight' => 0,
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
@@ -444,7 +444,7 @@ function tripal_organism_node_view($node, $view_mode, $langcode) {
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_organism_teaser'] = array(
-          '#value' => theme('tripal_organism_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_organism_teaser', array('node' => $node)),
         );
       }
       break;

+ 1 - 1
tripal_phenotype/tripal_phenotype.module

@@ -141,7 +141,7 @@ function tripal_phenotype_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_feature_phenotypes'] = array(
-          '#value' => theme('tripal_feature_phenotypes', array('node' => $node)),
+          '#markup' => theme('tripal_feature_phenotypes', array('node' => $node)),
           '#tripal_toc_id'    => 'phenotypes',
           '#tripal_toc_title' => 'Phenotypes',
         );

+ 6 - 6
tripal_project/includes/tripal_project.chado_node.inc

@@ -464,35 +464,35 @@ function tripal_project_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_project_base'] = array(
-          '#value' => theme('tripal_project_base', array('node' => $node)),
+          '#markup' => theme('tripal_project_base', array('node' => $node)),
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
           '#weight' => 0,
         );
         $node->content['tripal_project_contact'] = array(
-          '#value' => theme('tripal_project_contact', array('node' => $node)),
+          '#markup' => theme('tripal_project_contact', array('node' => $node)),
           '#tripal_toc_id'    => 'contacts',
           '#tripal_toc_title' => 'Contacts',
         );
         $node->content['tripal_project_properties'] = array(
-          '#value' => theme('tripal_project_properties', array('node' => $node)),
+          '#markup' => theme('tripal_project_properties', array('node' => $node)),
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
         $node->content['tripal_project_publications'] = array(
-          '#value' => theme('tripal_project_publications', array('node' => $node)),
+          '#markup' => theme('tripal_project_publications', array('node' => $node)),
           '#tripal_toc_id'    => 'publications',
           '#tripal_toc_title' => 'Publications',
         );
         $node->content['tripal_project_relationships'] = array(
-          '#value' => theme('tripal_project_relationships', array('node' => $node)),
+          '#markup' => theme('tripal_project_relationships', array('node' => $node)),
           '#tripal_toc_id'    => 'relationships',
           '#tripal_toc_title' => 'Relationships',
         );
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_project_teaser'] = array(
-          '#value' => theme('tripal_project_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_project_teaser', array('node' => $node)),
         );
       }
       break;

+ 11 - 11
tripal_pub/includes/tripal_pub.chado_node.inc

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

+ 9 - 9
tripal_stock/includes/tripal_stock.chado_node.inc

@@ -852,52 +852,52 @@ function tripal_stock_node_view($node, $view_mode, $langcode) {
     case 'chado_stock':
       if ($view_mode == 'full') {
         $node->content['tripal_stock_base'] = array(
-          '#value' => theme('tripal_stock_base', array('node' => $node)),
+          '#markup' => theme('tripal_stock_base', array('node' => $node)),
           '#tripal_toc_id'    => 'base',
           '#tripal_toc_title' => 'Details',
           '#weight' => 0,
         );
         $node->content['tripal_stock_collections'] = array(
-          '#value' => theme('tripal_stock_collections', array('node' => $node)),
+          '#markup' => theme('tripal_stock_collections', array('node' => $node)),
           '#tripal_toc_id'    => 'collections',
           '#tripal_toc_title' => 'Stock Collections',
         );
         $node->content['tripal_stock_properties'] = array(
-          '#value' => theme('tripal_stock_properties', array('node' => $node)),
+          '#markup' => theme('tripal_stock_properties', array('node' => $node)),
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
         $node->content['tripal_stock_references'] = array(
-          '#value' => theme('tripal_stock_references', array('node' => $node)),
+          '#markup' => theme('tripal_stock_references', array('node' => $node)),
           '#tripal_toc_id'    => 'references',
           '#tripal_toc_title' => 'References',
         );
         $node->content['tripal_stock_relationships'] = array(
-          '#value' => theme('tripal_stock_relationships', array('node' => $node)),
+          '#markup' => theme('tripal_stock_relationships', array('node' => $node)),
           '#tripal_toc_id'    => 'relationships',
           '#tripal_toc_title' => 'Relationships',
         );
         $node->content['tripal_stock_synonyms'] = array(
-          '#value' => theme('tripal_stock_synonyms', array('node' => $node)),
+          '#markup' => theme('tripal_stock_synonyms', array('node' => $node)),
           '#tripal_toc_id'    => 'synonyms',
           '#tripal_toc_title' => 'Synonyms',
         );
         $node->content['tripal_stock_publications'] = array(
-          '#value' => theme('tripal_stock_publications', array('node' => $node)),
+          '#markup' => theme('tripal_stock_publications', array('node' => $node)),
           '#tripal_toc_id'    => 'publications',
           '#tripal_toc_title' => 'Publications',
         );
       }
       if ($view_mode == 'teaser') {
         $node->content['tripal_stock_teaser'] = array(
-          '#value' => theme('tripal_stock_teaser', array('node' => $node)),
+          '#markup' => theme('tripal_stock_teaser', array('node' => $node)),
         );
       }
       break;
     case 'chado_organism':
       if ($view_mode == 'full') {
         $node->content['tripal_organism_stocks'] = array(
-          '#value' => theme('tripal_organism_stocks', array('node' => $node)),
+          '#markup' => theme('tripal_organism_stocks', array('node' => $node)),
           '#tripal_toc_id'    => 'stocks',
           '#tripal_toc_title' => 'Stocks',
         );