Important
You are browsing the documentation for version 3.1 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.
See our Release Process documentation for more information on the currently supported and upcoming releases.
Assets¶
Filename |
|
Root Node |
|
The assets.yml
file can be used to define CSS file groups. The listed files will be
automatically merged and optimized for web presentation.
The following example creates two groups (first_group
and second_group
) each of them
containing three CSS files:
1# src/Acme/DemoBundle/Resources/config/oro/assets.yml
2assets:
3 css:
4 first_group:
5 - 'First/Assets/Path/To/Css/first.css'
6 - 'First/Assets/Path/To/Css/second.css'
7 - 'First/Assets/Path/To/Css/third.css'
8 second_group:
9 - 'Second/Assets/Path/To/Css/first.css'
10 - 'Second/Assets/Path/To/Css/second.css'
11 - 'Second/Assets/Path/To/Css/third.css'
By default, when you install the application’s assets using the assets:install
command, all
CSS files from all groups and all bundles will be merged and optimized.
For debugging purposes compression of CSS files of certain groups can be disabled with the
css_debug
option:
1oro_assetic:
2 css_debug:
3 - first_group
Tip
You can use the oro:assetic:groups
command to get a list of all available groups.