This is an extremely simple module that allows a front-end developer to reload regions with ease using a single javascript command that takes url, post data and regions as the only parameters.

As an example, the below code ajaxifies all the links.

(function ($) {
  Drupal.behaviors.ajaxRegionsExample = {
    attach: function(context, settings) {
      $("a", context).click(function() {
        // Simply reload ALL of the regions when ever a link is clicked.
        href = $(this).attr("href");
        var regions = new Array();
        for (i in Drupal.settings.ajaxRegionsExample.regions) {
          region = Drupal.settings.ajaxRegionsExample.regions[i];
          regions[i] = {
            selector: '.region-' + region.replace("_", "-"),
            region: region
          };       
        }
        Drupal.ajaxRegions.load(href, {}, regions);
        // Don't do da default thang.
        return false;
      });
    }
  }
} (jQuery));

Please see the very simple example module for details.

Downloads

Other releases

Version Downloads Date Links
7.x-1.0-alpha2 tar.gz (8.94 KB) | zip (11.38 KB) 2011-Sep-07 Notes

Development releases

Version Downloads Date Links
7.x-1.x-dev tar.gz (8.78 KB) | zip (11.31 KB) 2012-Feb-14 Notes

Project Information


Maintainers for Ajax Regions

  • tcmug - 12 commits
    last: 14 weeks ago, first: 38 weeks ago

Issues for Ajax Regions

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports