Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimrichhannot/contao-components
Components is a contao extension that gives better control over javascript and css invocation within page layouts.
https://github.com/heimrichhannot/contao-components
Last synced: about 1 month ago
JSON representation
Components is a contao extension that gives better control over javascript and css invocation within page layouts.
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-components
- Owner: heimrichhannot
- Created: 2017-03-21T13:25:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T07:42:48.000Z (8 months ago)
- Last Synced: 2024-09-25T23:11:30.944Z (3 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Components
Components is a contao extension that gives better control over javascript and css invocation within page layouts.
If you register your javascript and css files as component, it is possible to disable the component for each layout.## Technical instruction
To disable custom js/css components, register them within '$GLOBALS['TL_COMPONENTS']'.
The following example is taken from [heimrichhannot/contao-bootstrapper](https://packagist.org/packages/heimrichhannot/contao-bootstrapper).
```
$GLOBALS['TL_COMPONENTS'] = array
(
'bs.inputSlider' => array
(
'js' => array
(
'files' => array
(
'system/modules/bootstrapper/assets/vendor/seiyria-bootstrap-slider/dist/bootstrap-slider' . (!$GLOBALS['TL_CONFIG']['debugMode'] ? '.min' : '') . '.js|static',
BOOTSTRAPPER_JS_COMPONENT_DIR . '/input-slider/bs.inputSlider' . (!$GLOBALS['TL_CONFIG']['debugMode'] ? '.min' : '') . '.js|static',
),
),
'css' => array
(
'files' => array
(
'system/modules/bootstrapper/assets/vendor/seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css|screen|static',
)
),
),
'bs.tooltip' => array
(
'js' => array
(
'files' => array
(
BOOTSTRAPPER_JS_COMPONENT_DIR . '/tooltip/bs.tooltip' . (!$GLOBALS['TL_CONFIG']['debugMode'] ? '.min' : '') . '.js|static',
),
)
),
'modernizr' => array
(
'js' => array
(
'files' => array
(
'system/modules/bootstrapper/assets/vendor/modernizr.min.js|static',
),
'before' => 0, // invoke always before jquery of the given key
//'after' => 'bs.core', // invoke always after bs.core
),
),
);
```