I want to do what the nodeteaser module does (make a separate field for teaser that is completely separate from body) but using CCK and Contemplate instead. I'm almost there.

My only problem now is that when the field_teaser field is blank, nothing shows up at all for the teaser. I'd like it to behave like Drupal does by default, authomically create the teaser based on the setting at /admin/content/node-settings.

Here is the code that is on the Contemplate's template creation admin page at:
/content/types/content_type_name/template

<div class="field field-type-text field-field-teaser">
  <div class="field-items">
    <?php foreach ((array)$field_teaser as $item) { ?>
      <div class="field-item"><?php print $item['view'] ?></div>
    <?php } ?>
  </div>
</div>

How can I change it so that if the field is blank it will be behave like Drupal normally does?

Much thanks,

Shai

Comments

Shai’s picture

I'm trying to post this as a Contemplate support issue to hopefully get some response. http://drupal.org/node/161453