Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

field_longtext_pager

2 sites No security coverage
View on drupal.org

This module provides a field formatter for splitting large longtext field content into
more readable indexed sub-pages as defined by page breaks or a number of characters, words or HTML blocks.

It also provides additional optional display features:

  • Pager index field
  • Estimated reading time field
  • Ajax paging

Requirements

Drupal 8.x or above.

Installation

Install as you would normally install a contributed Drupal module.
Visit https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules for further information.

Instructions

To set module default settings, visit:
SITE-URL/admin/config/content/field_longtext_pager

You must ensure that your text formats and editors allow your page break placeholder.
Default is:

<!--pagebreak-->
There are CKEditor modules to enable manual insertion.

To enable paging on your field, visit the Manage display options in your entity
field settings, i.e.:
/admin/structure/types/manage/ENTITY-ID/display

Select the "Field pager" format option and choose your desired settings.

Ajax pager results currently use the "Full page" view to return results, falling back
to the "Default" view when not found. Which is often the case with entities such as comments.

The pager IDs are automatically incremented from the setting defined in the field
options when multiple entities using paged fields are displayed on the same page.
Reserve your highest pager ID settings for your field in this scenario.

Technical description

The algorithms are designed to split complicated HTML markup smartly, i.e.:

    <div class="text-important">
      <p class="info">
        Long content paragraph...
        <!--pagebreak-->
        Continuation of long content paragraph.
      </p>
      <ul class="text-note">
        <li>List #1</li>
        <li>Long list #2...
       <!--pagebreak-->
        Continuation of long list #2</li>
        <li>List #3</li>
      </ul>
    </div>

...into this:

    <div class="text-important">
      <p class="info">
        Long content paragraph...
      </p>
    </div>
    ------------Page 1------------
    <div class="text-important">
      <p class="info">
        Continuation of long content paragraph.
      </p>
      <ul class="text-note">
        <li>List #1</li>
        <li>Long list #2...</li>
      </ul>
    </div>
    ------------Page 2------------
    <div class="text-important">
      <ul class="text-note">
        <li>Continuation of the long list #2</li>
        <li>List #3</li>
      </ul>
    </div>
    ------------Page 3------------

Support

Please use the issue queue for filing bugs with this module at:
http://drupal.org/project/issues/field_longtext_pager

Author and maintainer

Activity

Total releases
2
First release
Jun 2025
Latest release
10 months ago
Release cadence
0 days
Stability
0% stable

Releases

Version Type Release date
2.0.x-dev Dev Jun 1, 2025
2.1.x-dev Dev Jun 1, 2025