creating client library in AEM 6.1 version | Community
Skip to main content
mudaliar847906
Level 2
September 17, 2021
Solved

creating client library in AEM 6.1 version

  • September 17, 2021
  • 3 replies
  • 1266 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Asutosh_Jena_

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!

3 replies

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
September 17, 2021

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!

mudaliar847906
Level 2
September 17, 2021

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

 

Asutosh_Jena_
Community Advisor
Community Advisor
September 17, 2021

Yes.

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 17, 2021

@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.

Anny0505
Community Advisor
Community Advisor
September 19, 2021

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