Answer the question
In order to leave comments, you need to log in
How to force views to truncate the body field to the first dot?
I output the body field through views, specify a truncated text of 150 characters in the field settings, the number of characters decreases in the view output, but the fact is that sometimes views cuts off the last word at the end of the text, and it does not look neat. Tell me how you can truncate the body to the first point, i.e. the sentence? I noticed on many other Drupal sites that their text is cut off after the first sentence.
Answer the question
In order to leave comments, you need to log in
Redefine the views field template. Well, in it instead of "print $output;"print current(explode('.', $output));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question