InMotion Hosting Support Center

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.
  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.
  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.
  5. From here you will see the Structure menu options. You want to find and click on the Content Types selection.
  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.
  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.
  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.
  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.
  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.

Was this article helpful?
Continued Education in Course 103: Working with your Drupal 7 homepage
You are viewing Section 3: Changing the content preview length on the front page in Drupal 7
Section 2: Promoting an Existing Page to the front page in Drupal 7
Section 4: How to set the number of posts on front page of Drupal 7

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

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

n/a Points
2016-03-01 1:59 pm

Very, very, very important post. Thank you!

Post a Comment

Email Address:
Phone Number:

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

1 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


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:
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!