Hi,

I'd like to show teasers of my forum topic content types just like I do with posts that are promoted to the front page. The forum posts would still be organized in forums, just not presented in a table of titles. I've been working a lot with the forum-topic-list.tpl.php file, and I've been able to convert most of my forum topic list to divs instead of tables, but I don't see any way to include a teaser of a forum topic. Any php variables or other methods that may be helpful? Maybe the Views module?

Thanks,
Andrew G

Comments

goldschmidt.a’s picture

Found it! Just by using this php function in my forum-topic-list.tpl.php file, I'm able to call the content of the given node ande print the teaser directly in the forum topic list rather than just the titles:

<table>
<tbody>
  <?php foreach ($topics as $topic): ?>
    <tr class="<?php print $topic->zebra;?>">
      <td>
        <div class="forum-topic-<?php print $topic->nid;?>-teaser">
          <?php print node_view(node_load(array('nid'=>($topic->nid))), 1); ?>
        </div> <!-- /teaser -->
    <?php if ($topic->moved): ?>
	  <?php print $topic->message; ?>
    <?php endif; ?>
      </td>
    </tr>
  <?php endforeach; ?>
</tbody>
</table>

Thanks for the hint at:
http://drupal.org/node/38212

<?php
$node = node_load(array('nid'=>1));
$output = node_view($node, 1);
print $output;
?>

Sincerely,
Andrew G