3

When you enable the Drupal 7 Blog module, the blog page (http://mydrupal.tld/blog) displays truncated blog entries. It looks like Drupal truncates after the end of the first paragraph (<p>). In order to see the entire blog entry, you have to click on its title or on the Read more link.

I'd like to save that click to my visitors by displaying full length blog entries directly on the blog page.

It seems that print render($content); performs the truncation, but I couldn't find anything in the method's API about that.

Any idea ?

6
  • Is it necessary to use the built in blog module? A View could easily accomplish what you need. – Letharion Apr 17 '12 at 11:22
  • Yes I have to use this module because I'm migrating from a 6.x version with an existing database. – Anto Apr 17 '12 at 11:23
  • I strongly disagree that this is a reason enough to keep to the blog module. You should also be aware that while the module itself may live on, it has been dropped from Core in D8. I would move away from it as soon as possible. (drupal.org/node/233301) – Letharion Apr 17 '12 at 12:58
  • Guy: I'm starting with Drupal and my management doesn't leave me enough time to get into that kind of consideration. PLUS Drupal 7 IS SHIPPED with that module, so yeah, I'm using it, that seems pretty logical to me. – Anto Apr 17 '12 at 13:03
  • Using a blog module that ships with Drupal for blogging, yeah, that definitely is logical. I'm just saying that despite this, you shouldn't. The module is being dropped becuase it's just not a good module anymore, as is well documented in the issue I linked to. If this came across as a negative comment towards you, I apologize, I only meant to help. :) – Letharion Apr 17 '12 at 13:23
3

The length of the body text for a node teaser is set in the "Manage Display" section for the content type's fields.

Just go to http://mysite.com/admin/structure/types/manage/blog/display/teaser, and change the format/format settings (i.e. "Trim length") until the teasers look exactly like you want.

enter image description here

3
  • I've tried it already, but nor the "Plain text" option, nor rising the "Trim length" did solve my problem. It keeps displaying in the exact same way (only the first § gets shown). – Anto Apr 17 '12 at 11:34
  • Finally, unthicking "Teaser" in the "Custom display settings" section solved it (even if I don't really understand why). Thanks. – Anto Apr 17 '12 at 11:38
  • I am having the same problem. After the first <p> ends the teaser doesn't display anything else, even though it is well below the trim length I set in the teaser display. Can you explain what you mean by unthicking Teaser and where you did this? (I am assuming you mean content type->manage display->teaser, but not sure) – ril44 Apr 18 '12 at 0:25

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.