Documentation
- 1 Getting started
- 2 Integrated fundamentals
- 3 Content store
- 4 Blocks
- 5 Multi channel publishing
- 6 Storage
- 7 Themes and templating
- 7.1 Theme implementation
- 7.2 Loading assets with bower
- 7.3 Including assets
- 7.4 Twig template engine
- 7.5 Rendering of images in content
- 8 Solr
- 9 Contributing
- 9 Social media
- 9 Users
7.3 Including assets
The IntegratedAssetBundle allows to include assets when you need them.
Example: on a page with a form with a calendar you can include the calendar javascript files instead of adding them to the combined javascript which are loaded on every page. This keeps content pages fast.
Add inline style
{% integrated_stylesheets inline=true %}
body { background: red; }
p { font-size: 10px }
{% endintegrated_stylesheets %}
Add external stylesheets
{% integrated_stylesheets
'bundles/app/css/styles.css'
'bundles/app/css/styles2.css' %}
{% endintegrated_stylesheets %}
Prepend javascript
{% integrated_javascripts mode='prepend'
'bundles/app/js/script.js' %}
{% endintegrated_javascripts %}
Render stylesheets
{{ integrated_stylesheets() }}
Render javascripts
{{ integrated_javascripts() }}