Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

how to use .less files in adobe CQ5?

Avatar

Level 2

Hi All,

i'm new in Adobe CQ5, and developing CMS Application using this, i create ClienLibraryFolder in following directory:

/etc/designs/MySiteName/ClientLibFolder/MyLess.less

but when i'm using this on .jsp file it is not design anything what i defined in .less file, while using .css files i'm getting all things. can anyone suggest me what i'm missing here

1 Accepted Solution

Avatar

Correct answer by
Level 9
5 Replies

Avatar

Level 2

hi Feike thanks for your reply,
 i'm using as :<cq:includeClientLib css="etcdesigns.inmovement.ClientLibrary.base" /> 

it neither throw any error  nor solve my issue, i mean it is not including my .less files 
in ClientLibrary directory i create a css.txt file and there i put my code as:

#base=less
    desktop.less
    mobile.less
    tablet.less
desktop/heroarea.less

is anything missing here...

Avatar

Correct answer by
Level 9

Avatar

Employee

Can you share a screenshot of your structure of your clientlib?

Also check the error.log to see if any error is logged there.

Avatar

Level 10

As stated in the artilce:

To use LESS files, simply include them in your ClientLib folder, or whatever folder you have specified as your base in css.txt. List the LESS files in css.txt so they get included. They can be mixed with CSS files if you like. - See more at: http://www.citytechinc.com/us/en/blog/2012/08/less_css_in_adobecq.html#sthash.ssJbsiYg.dpuf

They are simply like using other CSS files in AEM. 

Also - when using cq:includeClientLibs - reference the categories property of the clientlibs node:

<cq:includeClientLib categories="jquerysamples" />