Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Note: Ajax Include Pattern 1.4+ requires jQuery 1.7+. The easiest way to do this is jquery_update but this is not a dependency as users may wish to update jQuery in other ways. Alternatively, download and use v1.3 of the library.
Lazy Load Field allows any field to be loaded with AJAX rather than included in the initial page download. This is useful for fields that would otherwise add significantly to the page download so that the initial page load is quicker (particularly on mobile devices). Additionally, a media query can be specified (per field) so that the field is only loaded under certain conditions.
The module uses (and requires) the Ajax-Include-Pattern Javascript library by The Filament Group to replace this empty span with the fully rendered field. The field will use all of its normal settings and configuration for display.
Installation
- Download the module and extract to your preferred module location (e.g.
sites/all/modules
). - Download the library and extract to your preferred libraries location (e.g.
sites/all/libraries
) and rename the directory to 'ajax_include_pattern
'. - Enable the module.
- Go to 'Manage Display' for the content type and view mode you wish to enable.
- Edit the settings for the field you wish to enable lazy loading for, tick the checkbox and optionally add a media query to control the loading.
Project information
- Module categories: Content Display, Site Structure, Developer Tools
- Created by justanothermark on , updated