0

I am using the Blog module, but don't like the 600 character trim length. I want 2000 char.

But, I can't find out where to change this in the admin console.

I was able to update the trim length through the mysql console, but this seems less than ideal.

The code below was how I was able to complete the config change. How can i do this without a SQL update?

mysql> select * from field_config_instance where id=9\G
*************************** 1. row ***************************
         id: 9
   field_id: 2
 field_name: body
entity_type: node
     bundle: blog
       data: a:6:{s:5:"label";s:4:"Body";s:6:"widget";a:4:{s:4:"type";s:26:"text_textarea_with_summary";s:8:"settings";a:2:{s:4:"rows";i:20;s:12:"summary_rows";i:5;}s:6:"weight";i:31;s:6:"module";s:4:"text";}s:8:"settings";a:3:{s:15:"display_summary";b:1;s:15:"text_processing";i:1;s:18:"user_register_form";b:0;}s:7:"display";a:2:{s:7:"default";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:0;}s:6:"teaser";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:23:"text_summary_or_trimmed";s:8:"settings";a:1:{s:11:"trim_length";i:600;}s:6:"module";s:4:"text";s:6:"weight";i:0;}}s:8:"required";b:0;s:11:"description";s:0:"";}
    deleted: 0
1 row in set (0.00 sec)

mysql> update field_config_instance set data='a:6:{s:5:"label";s:4:"Body";s:6:"widget";a:4:{s:4:"type";s:26:"text_textarea_with_summary";s:8:"settings";a:2:{s:4:"rows";i:20;s:12:"summary_rows";i:5;}s:6:"weight";i:31;s:6:"module";s:4:"text";}s:8:"settings";a:3:{s:15:"display_summary";b:1;s:15:"text_processing";i:1;s:18:"user_register_form";b:0;}s:7:"display";a:2:{s:7:"default";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:0;}s:6:"teaser";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:23:"text_summary_or_trimmed";s:8:"settings";a:1:{s:11:"trim_length";i:3000;}s:6:"module";s:4:"text";s:6:"weight";i:0;}}s:8:"required";b:0;s:11:"description";s:0:"";}'
    -> where id=9;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0`
  • First try to set up your blog teasers like @Triskelion suggested below, and if it doesn't fit your need, then you can try Smart Smart Trim module which improves the "Summary or Trimmed" formatter built into Drupal. – Jack-PL Jun 5 '13 at 20:54
2

You can go to admin/structure/types/manage/blog/display/teaser and on the right next to the format settings for Summary or trimmed you will see a button with a little star on it. Click on it and set your trim length.

  • Ok.... seems to work. Thanks! But how come there's no blog content type at admin/structure/types/manage/? Manually constructing a url seems odd. – trimbletodd Jun 6 '13 at 0:19
  • The content type should be there. If not you have a different issue. – Triskelion Jun 6 '13 at 0:37
  • Odd. The blog content trim length is definitely working as expected, but there must be something odd that would prevent it from showing on the content types page. – trimbletodd Jun 6 '13 at 5:12

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.