tripal_stock_teaser.tpl.php 570 B

12345678910111213141516
  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>