My css is not visible in aem

Avatar

Avatar

pranjalk4508722

Avatar

pranjalk4508722

pranjalk4508722

06-09-2018

hi everyone,

I started created one website on aem i created one component and add content in body.html file  then i created clientlibs folder under apps/myproject and add css and js files in that folder and refrence this css files and js files in body.html file 

<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" />

<sly data-sly-call="${clientlib.css @ categories='Carnival.components'}" />

<sly data-sly-call="${clientlib.js @ categories='Carnival.components'}" />

but on my page css and js is not working only contents are shown in scattered way

thanks in advance

Replies

Avatar

Avatar

Manish_Singh_1

Employee

Avatar

Manish_Singh_1

Employee

Manish_Singh_1
Employee

06-09-2018

When you declare client libs in /apps in AEM 6.4, you have to access it via a proxy servlet. To do that, you have to define allowProxy =true in your client libs folder

Read this: Using Client-Side Libraries