LESS (CSS Compiler)

Skip to end of metadata
Go to start of metadata

pimcore is able to compile your .less files to common css.

You can use 2 different less compiler implentations, the default compiler is a lessc port in PHP which doesn't cover all LESS functionality, and the official LESS compiler (lessc).
The latter you have to install on your server and tell pimcore the path to the executable. (read more here) Please always use the full path to the executable eg. /usr/local/bin/lessc and not just lessc.

The implementation is very easy, just enable the LESS outputfilter in the system settings, and remove your less.js javascript  out of your template.

In editmode pimcore will add the less.js to your HTML header, in the frontend the less is compiled to css on the serverside.

To use LESS with a css-file, you have to use rel="stylesheet/less" in your link-tag, e.g.:

<link href="/static/css/example.css" media="screen" rel="stylesheet/less" type="text/css" >
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.