Under the Hood
Permalink Browser Info Environment
Blocks by AJAX works by allowing the block controller to run as normal when the page/area is edited or initially rendered. Thus any css and script files loaded by the block controller (addHeaderItem etc.) will be included when the page is initially rendered. The Blocks by AJAX template then substitutes an AJAX loader for the block content.
In the browser, the AJAX loader is then run to call a Concrete5 tool file. On the server, the tool re-creates the block, instantiates the controller and returns the normal view of just the block body without any headers or footers. Back in the browser, the block view is displayed and any scripts in the block view are then run.
In the browser, the AJAX loader is then run to call a Concrete5 tool file. On the server, the tool re-creates the block, instantiates the controller and returns the normal view of just the block body without any headers or footers. Back in the browser, the block view is displayed and any scripts in the block view are then run.
Type: | Discussion |
---|---|
Status: | Archived |
For example, BLOCKS_BY_AJAX_DEAFAULT_THROBBER can be used to globally change the throbber (waiting) image shown while an AJAX request is in progress. As before, the throbber can also be set for a specific block by creating a custom template.
See the documentation for more details of the definitions available.