Developer forum

Forum » CMS - Standard features » Setting up less compiler on a non rapido dynamicweb solution

Setting up less compiler on a non rapido dynamicweb solution

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

As i see here on the forum, it is possible to set up a solution to render less on-the-fly with a built in less renderer in dynamicweb?

How can I configure a solution to run on a less stylesheet file instead of css?

br

Hans


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Hi Hans,

We are using dotless for handling the .less files. 

We provide some functionality that generates less/css based on website settings and compiles all the .less files in specific folders to .css, which you can then reference in your template. See Dotless & website settings.

You can also just register a handler in web.config and you will be able to reference .less files directly and they will be parsed at runtime.

Scroll to the bottom of web.config and add the following inside the <handlers> section - right before the StaticFile handler.

<add name="less-handler" type="dotless.Core.LessCssHttpHandler,dotless.Core" path="*.less" verb="*" />

You can now add something like this to your template...

<link rel="stylesheet" href="/Files/test.less" />

Best regards,
Morten

Votes for this answer: 1
 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Ok, perfect Morten

But this would require the solution being a Custom solution, correct?

/Hans

 

You must be logged in to post in the forum