Drupal is a registered trademark of Dries Buytaert
Module Revived: Entity API 8.x-1.7 Module entity updated after 17 months of inactivity (8.x-1.7). Release: WebProfiler 11.2.2 Minor update available for module webprofiler (11.2.2). Release: Field Nif, Nie or Cif 1.2.0 Minor update available for module field_nif_nie_cif (1.2.0). Release: Image Styles Builder 1.1.8 Minor update available for module image_styles_builder (1.1.8). Release: Static Suite 1.2.13 Minor update available for module static_suite (1.2.13). Release: Simple password policy 1.1.2 Minor update available for module simple_password_policy (1.1.2). Release: Simple password policy 1.1.1 Minor update available for module simple_password_policy (1.1.1). Release: Static Suite 1.2.12 Minor update available for module static_suite (1.2.12). Release: Audit Chain 1.4.0 Minor update available for module audit_chain (1.4.0). Usage Milestone: Field as Block Module fieldblock crossed 1,000 active installs.

Ajax Block

213 sites Security covered
View on drupal.org

This module allows you to configure blocks to load using Ajax. Instead of rendering the block directly, a placeholder is shown, and the block's content is loaded and displayed via Ajax. This can be useful for bypassing caching mechanisms, though it may not be necessary if you are using Drupal's BigPipe module.

Provides the ability to load blocks via Ajax method. One can easily configure new and existing blocks to load via Ajax.

Essentially a placeholder will be dropped in place instead of fully rendering the block. The block content will be pulled from a custom route and then rendered in place via Ajax.

Rendering or display blocks via Ajax is sometimes necessary to get around various levels of caching on a site.
On the other hand, please note that in many cases you won't need this, if you use BigPipe Core Module.

Requirements

No special requirements. Essentially requires Drupal Core blocks.

Install

Install like any other contributed module. Installing through composer is recommended:

Composer

composer require drupal/block_ajax
drush en block_ajax

Usage

  1. Visit Structure -> Block layout page.
  2. Edit or create new block.
  3. New section should appear on block called "Ajax Block".
  4. Check "Load block via Ajax".
  5. Configure any other necessary block settings. Save block.
  6. Place block in region.
  7. Test page where block was placed, and it should load via Ajax.

Notes

8.x-2.0 and up is completely redesigned and it quite different then previous versions. Latest branch/releases provide interface to load blocks via Ajax and other configurable options.

Previous branches (8.x-1.0 & below), provide a new blockbase class to extend from when building out new/custom blocks. Which in turn, provides Ajax functionality on that block.

Older branches will not be supported anymore, but can be used for the time being.

Activity

Tracked releases
1
Tracked since
Oct 2025
Latest release
9 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
3.0.1 Stable Oct 29, 2025