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?

  • 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 '13 at 7:11
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, privacy policy and cookie policy

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