install (node.js + npm required):
sudo npm install -g less
configure:
add less filter to assetic configuration:
# app/config/config.yml
# ...
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
filters:
cssrewrite: ~
less:
node: /usr/bin/node
node_paths: [/usr/lib/node_modules/]
using:
twig:
{% verbatim %}{% raw %}
{% stylesheets filter='less'
'@QcmsAdminBundle/Resources/public/less/layout.less'
'@QcmsAdminBundle/Resources/public/less/left-menu.less'
%}
<link rel="stylesheet" href="{{ asset_url }}">
{% endstylesheets %}
{% endraw %}{% endverbatim %}