0

I am using views to create a table in which I display blogs title and body. Blog is a content type in which body field can be any of plain text, HTML and full HTML. I want to display only two lines of the body for which I use trim option under Rewrite results tag, and set maximum length to 300 which serves the purpose for paragraphs. But if there is a line break then this doesn't work and the text appears in three lines. Please refer to snapshot below : enter image description here

The output in row number 2 is desired one. How do I go about it?

1
  • You can strip our the <br> tag while entering the text in the blog content type. By this way you can avoid the new line in views too.
    – Gladiator
    Nov 12, 2013 at 7:11

1 Answer 1

4

In the "Rewrite results" section, when you checked check-box "Trim this field to a maximum length", there is check-box "Field can contain HTML" in this section. If you check check-box ""Field can contain HTML", then Drupal will maintain your HTML with content.

Trim length

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.