Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Ajax Block

227 sites Security covered Drupal 10–11
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.

Depends on

Dependencies of the latest stable release

  • Token
  • block Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

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

Releases

Version Type Core Release date
3.0.1 Stable 10–11 Oct 29, 2025