The front page of your Drupal site is often used to display content previews for your other pages. You may have seen this on the front page of other blogs or magazine sites. Visitors are able to review a portion of the content and click on the title if they are interested in reading the full article.

By default, Drupal 7 sets this preview limit to 600 characters. You may wish to customize your content preview to show either a bit more or a bit less, depending on your individual tastes. In previous versions of Drupal, this setting was called Length Of Trimmed Posts. In Drupal 7, both the location and name of the setting has changed. It is now known as Trim Length. To change the amount of characters shown on the front page for content preview in Drupal 7, follow the instructions below.

How to modify the Trim Length setting in Drupal 7:

  1. Log into your Drupal 7 admin dashboard
  2. Look to the upper menu bar across the top of the screen. Find and click the Dashboard option.
    dashboard
  3. You should now see a screen for the Dashboard. At the top left of this page (or overlay if you have it enabled) you will see the Home > Administration links. Click on the Administration link.
    admin-link
  4. Now you are on the Administration page and see a new menu on the screen. Click on the Structure option to go to the next page.
    admin-struct
  5. From here you will see the Structure menu options. You want to find and click on the Content Types selection.
    admin-struct-type
  6. From here, you will see the different content types you have enabled for your Drupal 7 installation. You will see at least the two default types (Articles and Basic Pages). There may be more types listed if you have enabled modules for them. The Trim Length can be set for each content type. From here, choose your content type and select the Manage Display link for that content type. For this tutorial, I am selecting the Manage Display for the Basic Pages content type.
    admin-struct-type-page
  7. This leads to the Basic Page settings. Look for the tab that is labeled Teaser and click that. This tab is in all content types just under the page title on the left hand side.
    admin-struct-type-page-tease
  8. From the Teaser page you will see a setting labeled Trim Length followed by a number, which is the current setting. To the right you will see a small gear icon. Click the gear icon to expand that section to allow you to change the setting.
    admin-struct-type-page-tease-gear
  9. From the expanded section, you will see a field where you can enter the new setting. This has a lower limit of 1 and, while the 'unlimited' setting has been removed in Drupal 7, has an upper limit of 99999999999999999 (that's seventeen 9's in a row), making it effectively unlimited. Enter your desired preview limit. We changed the example from the default 600 to 100. Once you have entered your value click on the Update button just below, collapsing the editing area.
    admin-struct-type-page-tease-trim
  10. Click on the Save button at the bottom to save the updated settings. You can now view your newly set preview limit by visiting the front page of your site.
    Before After
    preview-content-before preview-content-after

You may want to repeat the process for the other content types in your site as well. You are now familiar with setting the Trim Length setting in Drupal 7.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 201005

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!