As more developer documentation for concrete5.7 becomes available and time permits, I will be porting more of my addons. I have a lot of addons in the marketplace and it will take a while to update them all to 5.7.

Blocks by AJAX

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.

See more addons by JohntheFish

Purchase

$80.00 Buy FiveSave 47%
Approved by PRB

Our 30 Day Support Policy

  • Replies to tickets every few days.

Support Hosted

  • On concrete5.org