Index: modules/views_node.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/Attic/views_node.inc,v retrieving revision 1.30.2.21 diff -u -p -r1.30.2.21 views_node.inc --- modules/views_node.inc 10 May 2008 20:17:00 -0000 1.30.2.21 +++ modules/views_node.inc 27 May 2008 22:30:53 -0000 @@ -71,9 +71,10 @@ function node_views_tables() { 'views_handler_field_body' => t('Full Text'), 'views_handler_field_teaser' => t('Teaser') ), + 'option' => 'string', 'addlfields' => array('nid'), 'notafield' => TRUE, - 'help' => t('Display the Main Content.'), + 'help' => t('Display the Main Content. Optionally enter the amount of characters the content will be trimmed to.'), ), 'view' => array( 'name' => t('Node: View link'), @@ -450,6 +451,10 @@ function views_handler_field_body($field $node->body = str_replace('', '', $node->body); + if ((int)$fielddata['options'] > 0) { + $node->teaser = $node->body = truncate_utf8($node->body, (int)$fielddata['options'], TRUE, TRUE); + } + // The 'view' hook can be implemented to overwrite the default function // to display nodes. if (node_hook($node, 'view')) {