Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Smart Trim

60,114 sites Security covered
View on drupal.org

Smart Trim provides an enhanced text field formatter that offers more control over trimming text compared to Drupal core. It allows you to specify trim length by characters or words, add a custom suffix, and optionally include a "more" link, all while being usable in various display contexts like Layout Builder and Views.

Smart Trim implements a new field formatter for textfields (text, text_long, and text_with_summary) that improves upon the "Summary or Trimmed" formatter built into Drupal core.

Requirements

Drupal contrib modules

Installation

Install and enable Smart Trim as you would any other contributed module. See
https://www.drupal.org/docs/extending-drupal/installing-modules

Configuration

After installing and enabling Smart Trim, you will see a "Smart trimmed" option in the format dropdown for your text fields. For content types, this is located on the "Manage Display" page. With Smart Trim, you have control over:

  • The trim length
  • Whether the trim length is measured in characters or words
  • Appending an optional suffix at the trim point
  • Configuring (optional) "More" link immediately after the trimmed text
  • Stripping out HTML tags from the field
  • Ability to customize the trimmed content via template override

The "More" link functionality may not make sense in many contexts, and may be redundant in situations where "Read More" is included in set of links included with the node. But it's there if you need it.

As Smart Trim provides a field formatter, use it anywhere field formatters are available, including Layout Builder and Views.

Mission statement

Smart Trim is designed to be a focused, lightweight improvement over Drupal core's current formatter trimming capabilities. The maintainers' focus is stability and ease-of-use. Customizations to the module are encouraged with template overrides and Smart Trim hook implementations.

Documentation

Getting started (example)

  1. Navigate to Administration > Extend and enable the module.
  2. Navigate to Administration > Structure > Content types > Article > Manage display, then click to configure the "Teaser" view mode.
    (/admin/structure/types/manage/article/display/teaser)
  3. Select Smart trimmed as the Format for the Body field.
  4. Click the configuration gear for the Body field.
  5. Update Smart Trim formatter configuration as desired. Configuration options include:
    • Trim by number of characters or words.
    • Customize the "More" link.

As Smart Trim provides a field formatter, use it anywhere field formatters are available, including Layout Builder and Views.

Full documentation

https://www.drupal.org/docs/contributed-modules/smart-trim

Maintenance plan

The latest release is actively maintained for the latest versions of Drupal (Drupal 10+)

Activity

Total releases
2
First release
Jan 2026
Latest release
6 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
2.3.1 Stable Jan 11, 2026
2.3.0 Stable Jan 11, 2026