Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Chunker

Security covered Drupal 9–11
View on drupal.org

Breaks content (body text) into sections at header boundaries. This enables us to use collapsible fieldsets. tabs, vertical tabs or other jqueryUI style formatters like accordion to create in-page pagination automatically, while editors only have to write H2 (or h3) tags to trigger that behavior.

This can be applied over top of any existing body content, as part of the 'field display' settings. It can be applied retroactively to any content.

Currently working:
* Semantic chunking (just wraps additional divs around things in useful places - letting you style or indent subsections better.)
* Automatic heading anchors (optional)
* Collapsible fieldset style markup for page sections (even though that's an abuse of fieldsets, it's what Drupal does..)
* Stand-alone Horizontal or vertical tabs for page sections
* Integration with field_group . If you use the field_group vertical tabs, horizontal tabs or accordion layouts, you can insert page sections as individual tabs alongside the field_group tabs.
* A javascript-only numeric pager, that lets you navigate through pages using 'previous' and 'next' buttons, or jump to page (element) number. (Credits to jPaginate jQuery plugin for inspiration here)
* Custom mode - where you can choose the markup and classes that get applied to your wrappers.

Theory

This process runs in two main steps :

  1. Chunks the content and re-arranges the markup semantically
  2. Adds additional UI effects to the content

In the first, it transforms the 'flat' flow of normal editors simple heading markup:

h2  "Section 1"
p   "Section 1 intro content"
h3  "Section 1.1"
p   "Subsection of section 1"
h3  "Section 1.2"
p   "Another subsection of section 1"
h2  "Section 2"
p   "Section 2 content"
<h2>Section 1</h2>
<p>Section 1 intro content</p>
<h3>Section 1.1</h3>
<p>Subsection of section 1</p>
<h3>Section 1.2</h3>
<p>Another subsection of section 1</p>
<h2>Section 2</h2>
<p>Section 2 content</p>

And turns it into "Chunkier" but more hierarchical, semantic layout, where the higher sections actually contain the subsections instead of just preceding them:

h2      "Section 1"
..p     "Section 1 intro content"
..h3    "Section 1.1"
....p   "Subsection of section 1"
..h3    "Section 1.2"
....p   "Another subsection of section 1"
h2      "Section 2"
..p     "Section 2 content"

... This does involve adding more divs (or optional markup of your choice).

<div class="section depth-2" id="section-1">
  <h2>Section 1</h2>
  <div class="section-content depth-1">
    <p>Section 1 intro content</p>
    <div class="section depth-3" id="section-1-1">
      <h3>Section 1.1</h3>
      <div class="section-content depth-3">
        <p>Subsection of section 1</p>
      </div>
    </div>
    <div class="section depth-3" id="section-1-2">
      <h3>Section 1.2</h3>
      <div class="section-content depth-3">
        <p>Another subsection of section 1</p>
      </div>
    </div>
  </div>
</div>
<div class="section depth-1" id="section-2">
  <h2>Section 2</h2>
  <div class="section-content depth-1">
    <p>Section 2 content</p>
  </div>
</div>

What this enables however is for our core jquery-ui effects to instantly add hide/show/collapse behavior directly to sections, or for css to visually indicate the document structure (by boxing or indenting the contents)

Requirements

See also

This works well with architectures like "Display Suite" and its "View mode switcher" - it could provide you with the ability to display a 'Tabbed" view of a page yet allow the user to also see it unpacked in one long page.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Releases

Version Type Core Release date
2.0.0 Stable 9–11 Sep 11, 2024
2.0.0-alpha2 Pre-release Sep 21, 2023