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.

Ajax Block

245 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

Total releases
1
First release
Oct 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
3.0.1 Stable Oct 29, 2025