Developer forum

Forum » Templates » LESS
Peter Greve Assentorp
Reply
I've tried to run som dot Less code (lesscss.org) on a dynamicweb solution, but can't get it to work somehow. Are there any restrictions in DW, which conflict with .less files?

Kind regards
Peter

Replies

 
Richard Adams
Reply

I have the same problem. The server (DW) responds with 406 (Not Acceptable)

Everything else checks out fine when running the templatefile in a broeser, but when I render with DW it failes.

 
Mikkel Ricky
Reply

It may be the server configuration that causes this. Can you provide an example site where we can see the issue? (Send an email to me, mri@dynamicweb.dk, if you prefer to not share the url publicly).

Best regards,
Mikkel

 
Nuno Aguiar
Reply

Hi Peter and Richard,

 

We have developed a simple module that allows for:

 - blank module template - allow, for eg. set a template with Google Maps, letting the user change translate tags - this is pre-Items generation

 - compile and minify javascript files

 - preprocess LESS files, compile less (result) and css, and minify

 

Would this be of interest?

 

Nuno

 
Richard Adams
Reply

The error comes up on this URL: http://sinding.net.dynamicweb-cms.com/nb-NO/Forside.aspx?Purge=True

See the serverresponse here: http://screencast.com/t/3aerJPQzA

 

If the server can accept .less 

 

Nuno:
At the moment I'd like the server to accept .less. I'll keep you in mind :)

 
Mikkel Ricky
Reply
This post has been marked as an answer

I'm not an expert on LESS, but I think you should change your markup a bit (cf. http://lesscss.org/#client-side-usage), i.e. use

<link href="/Files/Templates/Designs/Førerkortbeslag/styles.css" rel="stylesheet/less" type="text/css" media="screen" />

rather than

<link href="/Files/Templates/Designs/Førerkortbeslag/styles.css" rel="stylesheet" type="text/less" media="screen" />

Requesting the stylesheet with type text/less results in the 406 error (see http://www.checkupdown.com/status/E406.html).

Best regards,
Mikkel

 

Votes for this answer: 1
 
Richard Adams
Reply

Thank you, Mikkel

This did the trick :)

 

You must be logged in to post in the forum