Custom tag which adds a ‘loader’ image to the page and performs a one-time action when loader comes into view.

mod_geomap uses this to load the map JavaScript once the admin widget has been opened by the user.


<div id="{{ #lazy }}">
    {% lazy action={update target=#lazy id=id template="_geomap_admin_location_map.tpl"} %}

lazy accepts the following arguments:

Argument Description Example
image The source of the image tag. Defaults to /lib/images/spinner.gif. image=”/lib/images/loading.gif”
class The css class of the image. Defaults to z-lazy. class=”loader”

Edit on GitHub