Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: MCP Sentinel 2.33.0 — Minor update available for module mcp_sentinel (2.33.0). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Lazy Views

160 sites Security covered Drupal 10–11

Part of the Lazy ecosystem · 5 projects

View on drupal.org

This module allows you to load Drupal Views on demand, either when a user clicks a button or link, or automatically when the page loads. It supports AJAX Views, respecting permissions, filters, and sorting.

A very simple module to load views either by click of a button/anchor or on page load.

Features

  • Load any Ajax view anywhere on the page via trigger or on page load
  • Respects Views permissions
  • Supports Filters
  • Supports Sorting

Installation

Consult https://www.drupal.org/docs/8/extending-drupal-8/installing-contributed-...
to see how to install and manage modules in Drupal 8.

Usage

First make sure the view you are wanting to load has "Use Ajax" set to Yes, without that this will not work.

You can load views either via a triggering element or just on page load using data attributes. The minimum requirement is to include the view id, view display.

Example: Trigger

The following would load the "Recent Content" view block into the div upon click of the anchor.

<a data-lv-id="content_recent" data-lv-display="block_1" href="#">Click Me</a></p>
<div class="lazy-view">&nbsp;</div>

Example: On load

The following loads the view into itself upon page load.

<div id="lazy-view" data-lv-id="content_recent" data-lv-display="block_1" data-lv-execute="true" data-lv-target="lazy-view"></div>

Example: Fully Decorated

The following demonstrates all data attributes available. Note that the target attribute can accept either a class or an id.

<button data-lv-id="content_recent" data-lv-display="block_1" data-lv-args='1,5' data-lv-target='my-custom-area' data-lv-execute='true'>Click Me</button>

<div id="my-custom-area">Loading Content...</div>

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Apr 2024
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.2 Stable 10–11 May 15, 2026
1.0.1 Stable 10–11 Apr 15, 2024