No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
composer.json
composer.lock

README.md

Yii2 lazy PJAX

When the page is generated, only empty pjax tag is included in the HTML. After the page loads, the specified view is loaded via pjax.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require kl83/yii2-lazy-pjax @dev

or add

"kl83/yii2-lazy-pjax": "@dev"

to the require section of your composer.json file.

Usage

In view:

(new LazyRender([
    'view' => 'slow-render-view', // view file
    'params' => [], // view params, optional
    'context' => null, // render context, optional
    'pjaxConfig' => [], // optional
    'getParameter' => '_lazy-pjax', // get parameter via which the rendering
                                    // command will be passed, optional
]))->render();

License

MIT License