Edit form for teaser?

hbfkf - April 2, 2007 - 12:02

Hi all,

When I edit a node (by visiting node/12/edit), I do not get an edit form for the node's teaser. Why is this so? Have I misconfigured something here?

Thanks a lot,
Kaspar

Here's the deal....

mfer - April 2, 2007 - 12:32

Here's how it works. Drupal takes the top of your post and make that the teaser. It does it smartly based on character count. You can edit that at /admin/content/node-settings. So, it's automated.

Want to override that? Simple enough. after the part of the body that you want to be the teaser put <!--break--> and drupal will know to make the teaser start at the beginning of the body and end at this point.

Or, there is the excerpt module at http://drupal.org/project/excerpt. But it hasn't been upgraded to drupal 5 yet. You can get a patch that will do that at http://drupal.org/node/97494#comment-206424.

--
Matt
http://www.mattfarina.com

Wow, thanks

hbfkf - April 2, 2007 - 13:52

Hi Matt,

Just to clarify things for me:

  • Does Drupal never store the teaser (and the column 'teaser' in table 'node_revisions' is thus unused)? Or...
  • Does Drupal use column 'teaser' in table 'node_revisions' but sets it to the truncated body at update/edit/create time?

Thanks a lot for the links; I'll go with Excerpt.

Kaspar

CRUD

mfer - April 2, 2007 - 18:02

Drupal does store the teaser. When a node is created or updated the body is truncated (or modules like excerpt can change it) and then stored in the teaser column of the node_revisions table.

--
Matt
http://www.mattfarina.com

 
 

Drupal is a registered trademark of Dries Buytaert.