0

I have the following code using Fields in display suite module:

<?php
$words = '[node:body]';
echo implode(" ",array_splice($words,0,60));
?>

But this does not work. My purpose here is to trimmed the content to 60 words for use in teaser. Because currently, display suite don't have the option to limit the number of words using Plain Text.

The problem with Trimmed is it does not removed the html formatting.

Muhammad Reda
  • 26,379
  • 14
  • 93
  • 105
jaypabs
  • 1,519
  • 10
  • 43
  • 62

1 Answers1

0

You Could use the smart trim module to achieve that http://drupal.org/project/smart_trim

user1108509
  • 99
  • 1
  • 6