Download the PHP package ivoschimani/loadscripts without Composer
On this page you can find all versions of the php package ivoschimani/loadscripts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ivoschimani/loadscripts
More information about ivoschimani/loadscripts
Files in ivoschimani/loadscripts
Package loadscripts
Short Description Allows optimized loading of JS and CSS.
License LGPL-3.0+
Informations about the package loadscripts
Contao LoadScripts
Introduction
The Module allows to specify which CSS / JS should be loaded in the \-Tag and which at the end of the \-Tag. The CSS and JS Files will be combined and Minimized. The CSS Files in the \-Tag will be embeded as inline Style. JS Files in the \-Tag smaller than 20kb will also be embeded as inline Javascript.
Usage
The Module adds new Fields to the Layout table where you can select your files which should be loaded in the \- and \-Tag
You could also use the $GLOBALS Array in your Template to load your Files.
Add your Files to the \$GLOBALS['TL_CSS_HEAD'] / \$GLOBALS['TL_JAVASCRIPT_HEAD'] Arrays to load your files in the \
-Tag and the \$GLOBALS['TL_JAVASCRIPT'] / \$GLOBALS['TL_CSS'] Arrays to load your Files at the end of the \-TagIf you use jQuery you could add some js code to the \$GLOBALS['TL_JAVASCRIPT_QUEUE'] Array. The Code will be executed after jQuery is Loaded.
The Module will work with the most custom extensions if you change the Templates. In many cases you have to add the inline JS Functions without the \