WARNING: concrete5 5.6 and earlier are end-of-life. Sales from the marketplace have now ended. Click here to learn more about this transition.

Do you have a requirement for specialised functionality built on Concrete CMS?
I work at an hourly rate or can offer a fixed price against a well defined requirement.

Notifications of private messages and support requests can be unreliable. If I have not responded within 24 hours, please email directly - contact details at c5magic.co.uk.

Blocks by AJAX (c5.6)

Speed up pages and add interaction by loading blocks, stacks and areas by AJAX.

v2.0 - new remote control and trigger blocks!

v2.0 of Blocks by Ajax now includes an optional remote control block, making it easy to override default settings. See the documentation for details.

Blocks by Ajax

Rather than loading a block with the containing page, load the block later by AJAX.

Using blocks by AJAX is simple, just create a block as you normally would, then assign it a 'blocks_by_ajax' template. Loading the block will then start by AJAX after the page has loaded or in response to many configurable events. 

Any block by AJAX

For most regular blocks, its simply a matter of assigning a Blocks by AJAX template. Templates are included in Blocks by AJAX and Blocks by AJAX Templates1 for many popular core and addon blocks. Furthermore, many addon blocks also ship with a Blocks by AJAX template, so you can always ask an addon developer if their addon comes with a Blocks by AJAX template or they are planning one. An ongoing list of templates is maintained in the Blocks by AJAX Forum area

You can AJAX load other block types by:

Full details on creating a custom template for other block types are given in the support pages.

Stacks by AJAX

If you have  Universal Content Puller, it can load stacks, areas from other pages and just about anywhere on the web with an included Blocks by AJAX template.

If not, you can also use a Blocks by AJAX template for the Stack Randomizer block. All you need to do is give it the 'blocks_by_ajax' template and a random choice of 1 stack will always show that stack by AJAX!

More details are given in the documentation and on the support pages.

Areas by AJAX

Blocks by AJAX includes templates for the Global Areas block and Parent Area block. To ajax load an area from another page, simply use one of these blocks with a 'blocks_by_ajax' template. A further addon,  Universal Content Puller, includes its own template for Blocks By Ajax.

Tab and Toggle by AJAX

Blocks by AJAX can be used within Magic Tabs and Magic Toggle sets, so you can load tab or toggle content by AJAX.

Control the loading event

By default, the included 'blocks_by_ajax' templates will load a block as soon as its containing DOM becomes visible on the page. The Remote Control settings block or simple php options within the template can be used to start the AJAX load:

  • As soon as the document is ready.
  • After a set delay
  • When the containing DOM becomes visible (default)
  • When the containing DOM scrolls close to the viewport
  • When a form is submitted
  • Triggered by a JavaScript event (for developers)

Repeat Loading

Remote Control settings can also be used to enable repeat loading of ajax content by any of these events.

Get Universal Content Puller and Blocks by AJAX together in AJAX Anything for a bargain price.

Check out Tab, Toggle and AJAX for a great bundle deal.

If you find the block cache obstructs some uses of Blocks by AJAX, Cache Free Content provides Blocks By AJAX and Magic Data templates together with cache free clones of the core Content and HTML blocks.

From version 2.4 this addon is compatible with php7. To update a site to php7 you will need to make core updates (at time of writing only on github and not released). You will also need to ensure that other addon packages are php7 compatible.

See more addons by JohntheFish


Sales have ended due to EOL

Approved by PRB

Our 30 Day Support Policy

  • Replies to tickets every few days.

Support Hosted

  • On marketplace.concretecms.com