Hiding Teasers in Drupal

A teaser is a small preview of a Drupal post. When clicking on a tag on a post, a list of other posts with that tag is shown by default. For some reason, Drupal designers decided to show the first part of the content with each article, but not the full article. I like the idea of just showing a list of links. Here’s how:

By default, teasers are enabled and there is not a simple WebUI way to remove these. There are two things you can do: 1. Make sure the preview of each node is blank, or 2. Change the template.

To change the template, open a file at: themes/bluemarine/node.tpl.php and find the following line:

<div class="content"><?php print $content?></div>

And change it to:

`<div class="content"><?php if (!$teaser) print $content?></div>`

drupal

131 Words

2010-07-10 14:32 +0000