tripal_library_teaser.tpl.php 700 B

12345678910111213141516171819
  1. <?php
  2. $node = $variables['node'];
  3. $library = $variables['node']->library;
  4. // get the library description. IT uses a tern name of 'Library Description'
  5. $libprop = tripal_library_get_property($library->library_id, 'Library Description');
  6. $description = $libprop->value; ?>
  7. <div class="tripal_library-teaser tripal-teaser">
  8. <div class="tripal-library-teaser-title tripal-teaser-title"><?php
  9. print l($node->title, "node/$node->nid", array('html' => TRUE));?>
  10. </div>
  11. <div class="tripal-library-teaser-text tripal-teaser-text"><?php
  12. print substr($description, 0, 650);
  13. if (strlen($description) > 650) {
  14. print "... " . l("[more]", "node/$node->nid");
  15. } ?>
  16. </div>
  17. </div>