heimrichhannot-contao-components / lazyload
Lazyload integration for Contao Open Source CMS
Installs: 961
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Type:contao-component
Requires
- contao-components/installer: ^1.0.9
README
This is a customized LazyLoad package to be integrated in Contao Open Source CMS.
Install
composer require heimrichhannot-contao-components/lazyload
In use
Config
Add the following to your config (keep keys to prevent double integration):
Contao 4
$GLOBALS['TL_USER_CSS']['huh_components_lazyload'] = 'assets/lazyload/css/lazyload.min.css|static';
$GLOBALS['TL_JAVASCRIPT']['huh_components_lazyload'] = 'assets/lazyload/js/8/lazyload.min.js|static';
// or
$GLOBALS['TL_JAVASCRIPT']['huh_components_lazyload'] = 'assets/lazyload/js/10/lazyload.min.js|static';
Contao 3
$GLOBALS['TL_USER_CSS']['huh_components_lazyload'] = 'assets/components/css/lazyload.css|static';
$GLOBALS['TL_JAVASCRIPT']['huh_components_lazyload'] = 'assets/components/js/8/lazyload.min.js|static';
// or
$GLOBALS['TL_JAVASCRIPT']['huh_components_lazyload'] = 'assets/components/js/10/lazyload.min.js|static';