Module admin page

This module allows to configure flexibly the internal links of your site, which will update the appointed regions using Ajax, instead of full page refresh.

Version 7.x-2.x
Using this module you can configure the usual ajax-menu without writing a line of code.

All the options are collected on one page of module configuration.(admin/config/system/ajax_regions)
You have to set json-object with list of regions (column AJAX-REGIONS) to links with certain selectors (column LINK), - which have to be updated by click. The json-object is specified as a: {"region_name1": "region-selector-1", "region_name2": "region-selector-2" ... }

Furthermore, you can view the following additional parameters in the options block:
SET LOADING-INDICATOR - imitation of indicator of loading the page by the browser
UPDATE DOCUMENT TITLE - title page refresh
UPDATE CURRENT ADDRESS - the name speaks for itself
UPDATE ACTIVE LINKS - setting to new link class = "active" (this class is used in menu of the theme appearance Bartik)

Besides, you have got the possibility to indicate your own js-functions Drupal.ajax_regions.before and Drupal.ajax_regions.after, that will be executed correspondingly - before and after loading of ajax-content. Clear these fields, if you don't want the functions to be generated on the pages of your site.

* PLEASE NOTE THAT ANYONE GRANTED THE PERMISSION "ADMINISTER AJAX REGIONS CONFIGURATION PAGE" CAN POST INJECT ARBITRARY JAVASCRIPT (INCLUDING XSS EXPLOITS). THERE IS NO WAY OF BLOCKING XSS EXPLOITS (INSERTED VIA THE ADMIN GUI) WITHOUT CRIPPLING THE MODULE.

Version 7.x-1.x
The module 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 axample, see js-code for ajaxifies all the links: https://www.drupal.org/node/1264168/revisions/1889810/view

And please see the very simple example module for details.

Migrate from 7.x-1.x to 7.x-2-x
Just replace js-function
Drupal.ajaxRegions.load(url, data, regions)
to
Drupal.ajax_regions.load(link, url, data, regions)
where link is js-object of the clicked link.
Requirements
None.

Project information

Releases