tripal_stock_teaser.tpl.php

  1. 2.x tripal_stock/theme/templates/tripal_stock_teaser.tpl.php
  2. 3.x legacy/tripal_stock/theme/templates/tripal_stock_teaser.tpl.php
1 theme call to tripal_stock_teaser.tpl.php
tripal_stock_node_view in tripal_stock/includes/tripal_stock.chado_node.inc
Implements hook_node_view(). Acts on all content types.

File

tripal_stock/theme/templates/tripal_stock_teaser.tpl.php
View source
  1. <?php
  2. $node = $variables['node'];
  3. $stock = $variables['node']->stock;
  4. $stock = chado_expand_var($stock,'field','stock.description'); ?>
  5. <div class="tripal_stock-teaser tripal-teaser">
  6. <div class="tripal-stock-teaser-title tripal-teaser-title"><?php
  7. print l($node->title, "node/$node->nid", array('html' => TRUE));?>
  8. </div>
  9. <div class="tripal-stock-teaser-text tripal-teaser-text"><?php
  10. print substr($stock->description, 0, 650);
  11. if (strlen($stock->description) > 650) {
  12. print "... " . l("[more]", "node/$node->nid");
  13. } ?>
  14. </div>
  15. </div>