2017 © Pedro Peláez
 

yii2-extension yii2-lazyload

Yii2 helper to lazy load images and/or to convert image captions into div markups (like wordpress)

image

chrisb34/yii2-lazyload

Yii2 helper to lazy load images and/or to convert image captions into div markups (like wordpress)

  • Tuesday, July 11, 2017
  • by chrisb34
  • Repository
  • 2 Watchers
  • 2 Stars
  • 31 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 7 % Grown

The README.md

Lazy Load images and apply captions

Yii2 helper to lazy load images and/or to convert image captions into div markups (like wordpress), (*1)

*Note: This project is still in DEV and is therefore not fully tested / stable, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist chrisb34/yii2-lazyload "*"

or add, (*5)

"chrisb34/yii2-lazyload": "*"

to the require section of your composer.json file., (*6)

Usage

In a view add the lazyload widget as follows;, (*7)

use chrisb34/lazyload;

echo LazyLoad::widget([
        // the data model
        'model' => $model
        // the model attribute that holds the html to convert
        'contentProperty' => 'attributeName',

        ... other config options - see source code 
    ]) 

see http://yii2.chris-backhouse.com for more details, (*8)

  • Thanks to

This uses the jquery plugins:, (*9)

Lazy Load Plugin for jQuery - Mika Tuupola http://www.appelsiini.net/projects/lazyload, (*10)

jCaption: jQuery Image Captions with Customizable Markup, Style and Animation - Joel Sutherland http://www.newmediacampaigns.com/blog/jcaption-a-jquery-plugin-for-simple-image-captions#download, (*11)

The Versions

11/07 2017

dev-master

9999999-dev

Yii2 helper to lazy load images and/or to convert image captions into div markups (like wordpress)

  Sources   Download

MIT

The Requires

 

by Chris Backhouse

extension yii2