Module Description
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"> </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>
Project Usage
53
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the problem of loading Ajax views either by click of a button/anchor or on page load in Drupal 8.
Data Name
lazy_views

OPENAI CHATBOT

OPENAI CHATBOT

13:41:24
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.