This project is not covered by Drupal’s security advisory policy.
FWIW, superseded by IO module.
AJAX Include Pattern for Modular Content.
Requirements
- matchMedia.js and Ajax-Include-Pattern
Download the library archives from the folllowing:
https://github.com/paulirish/matchMedia.js/
https://github.com/filamentgroup/Ajax-Include-Pattern/
Extract them, and rename the folders accordingly so they are available at:
sites/../libraries/matchmedia/matchMedia.js
sites/../libraries/matchmedia/matchMedia.addListener.js
sites/../libraries/ajaxinclude/dist/ajaxInclude.min.js
sites/../libraries/ajaxinclude/dist/ajaxIncludePlugins.min.js
- libraries (>=2.x)
- block.tpl.php must support Drupal attributes, content_attributes, or
title_attributes. The title is optional to have blocks without titles.
Installation
Install the module as usual.
Usages
Visit admin/structure/block, and find AJAX Include settings under Visibility.
Enable it as needed, and adjust the relevant options accordingly.
Features
- Flexible AJAX content placements, e.g.: before/after/replace/append the common block elements such as title/block/content.
- Interaction with click or mouseenter to trigger AJAX, otherwise onload.
- Custom target element to load AJAX content at a separate element.
- Media-qualified includes to include content based on a particular Media Query. Removing non-essential blocks for small devices has never been so efficient.
- Pure CSS preloaders.
- Optional noscript.
- Optional no cache.
- Option to exclude a particular block from a single concatenated request.
- Aggregated HTTP requests by default.
Limitation
Requires block.tpl which has attributes printed, meaning block--no-wrapper.tpl will fail.
Similar modules
ajaxblocks
AI for AJAX Include. AB for AJAX Blocks.
- AI adds a field to block table like i18n_block or block_class. AB creates a separate table.
- AI uses pure CSS preloaders. AB image-based.
- AI uses external libraries. AB none.
- AI consumes plain HTML dataType. AB JSON which means extra processing at client side.
- AI allows flexible placements via various methods and block elements: before, after, append, replace, in combination with block, content or title, e.g.: AJAX content may be placed before or after title, etc, or simply anywhere via target element. AB only expects a block content placement.
- AI offers custom target element to load content anywhere. Think static modal contents, or content loaded anywhere via interaction. AB none.
- AI makes use Drupal roles visibility. AB allows more controls for different roles with different cache strategy.
- AI has not been tested against Boost nor Authcache. AB claims them both.
- AI offers simple interaction to load contents, click and mouseenter. AB none.
- AI offers content visibility using CSS media query. AB none.
- AI offers loading distribution strategy to reduce lengthy delay: a single request for many automatically, and/or individual request if so configured manually. AB does the first only.
Both do not make use of Drupal AJAX framework. Both make GET requests to deliver faster than Drupal.ajax default to POST.
Project information
Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projectsObsolete
Use of this project is deprecated.- Project categories: Content display, Developer tools, Performance
- Created by gausarts on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
