Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

creating client library in AEM 6.1 version

Avatar

Level 2

Hi Team,

I never worked on AEM 6.1 version recently i got one PRODUCTION issue in AEM 6.1 version.

Now i need to create new client library and adding css for the component.

if any one working in AEM 6.1 for kindly help me with  step which i need to folow  to use the newly created css in component.

 

Regards

Manikantha R

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @mudaliar847906 

 

Please follow the below steps:

  • 1. Open CRXDE Lite in a web browser (http://:/crx/de).
  • 2. Select the folder where you want to locate the client library folder and click Create > Create Node.
  • 3. Enter a name for the library file, and in the Type list select cq:ClientLibraryFolder. Click OK and then click Save All.
  • 4. To specify the category or categories that the library belongs to, select the cq:ClientLibraryFolder node, add the following property, and then click Save All:
    • Name: categories
    • Type: String
    • Value: The category name
    • Multi: Select
  • 5. Add source files to the library folder by any means.
  • 6. Select the client library folder and click Create > Create file.
  • 7. In the file name box, type one of the following file names and click OK:
    • js.txt: Use this file name to generate a JavaScript file.
    • css.txt: Use this file name to generate a Cascading Style Sheet.
  • 8. Open the file and type the following text to identify the root of the path of the source files:
         #base=[root]
  • 9. On the lines below #base=[root], type the paths of the source files relative to the root. Place each file name on a separate line.
  • 10. Click Save All.

You can refer the link here as well:

http://www.sgaemsolutions.com/2017/06/clientlibs-in-aem-63-part1.html

 

Thanks!

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @mudaliar847906 

 

Please follow the below steps:

  • 1. Open CRXDE Lite in a web browser (http://:/crx/de).
  • 2. Select the folder where you want to locate the client library folder and click Create > Create Node.
  • 3. Enter a name for the library file, and in the Type list select cq:ClientLibraryFolder. Click OK and then click Save All.
  • 4. To specify the category or categories that the library belongs to, select the cq:ClientLibraryFolder node, add the following property, and then click Save All:
    • Name: categories
    • Type: String
    • Value: The category name
    • Multi: Select
  • 5. Add source files to the library folder by any means.
  • 6. Select the client library folder and click Create > Create file.
  • 7. In the file name box, type one of the following file names and click OK:
    • js.txt: Use this file name to generate a JavaScript file.
    • css.txt: Use this file name to generate a Cascading Style Sheet.
  • 8. Open the file and type the following text to identify the root of the path of the source files:
         #base=[root]
  • 9. On the lines below #base=[root], type the paths of the source files relative to the root. Place each file name on a separate line.
  • 10. Click Save All.

You can refer the link here as well:

http://www.sgaemsolutions.com/2017/06/clientlibs-in-aem-63-part1.html

 

Thanks!

Avatar

Level 2

Hi asutosh,

 

The above process which we will do in AEM 6.2+ versions.

Is it same process for AEM 6.1 version as well.

Please confirm.

 

Regards

Manikantha R

 

Avatar

Community Advisor

@mudaliar847906,

You can also checkout this video on how to create a client library in 6.1, https://www.youtube.com/watch?v=6FfPDCJSkK0

It will be the same format that you will follow from AEM 6.1 to the latest AEM.

Avatar

Community Advisor

Please check the link given below

https://aemexplained.wordpress.com/diy/client-libraries/
Same procedure will be applied for AEM 6.x version.

 

Thanks,

Aruna