Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

AEM Client Libraries folder in /content/dam

Avatar

Level 4

Hi Team,

Got a quick question with respect to the way client libraries work in AEM. Can we have client library folders(cq:clientLibraryFolder) created under /content/dam and there by load static files(.css and .js in DAM) using css.txt and js.txt which are located in same folder(under dam). I know it works all fine when we have under in /apps, /etc and /libs. I am wondering if it works for custom paths as well.

Because, in felix console (under OSGI configMgr), we have an option to configure the 'Allowed Library Paths' for client libraries (Adobe Granite Client Library Manager). But when i configure /content and/or /content/dam, I dont see the client libraries loading in my cq:Page. So, can we have CQ client libraries folders in /content or /content/dam?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

My Answer is No..We never creates Client Libraries under Content or DAM. You can create only in /apps and /designs

For component specific, include in Apps, and for global level include under etc/designs

What is exact requirement to have client libraries under /content and /dam

Thanks,

Ratna.

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

Hi,

My Answer is No..We never creates Client Libraries under Content or DAM. You can create only in /apps and /designs

For component specific, include in Apps, and for global level include under etc/designs

What is exact requirement to have client libraries under /content and /dam

Thanks,

Ratna.

Avatar

Level 4

Thank you Ratna kumar. I know we usually don't create it under /content or /content/dam. But why? are we going to have any security implications if we have client libraries loaded in /content/dam? or is it by design that AEM does not recommend loading it in DAM.

There is no such official requirement that i am catering to. I am exploring different  options. If having client libraries in DAM is a possibility, I could give business user access to DAM and there by let them manage it with out the need of the DEV team. They could load the JS libraies (which are used by .html files in DAM) of their choice in .txt files.

Avatar

Employee Advisor

If you allow your "business" to update Javascript libraries and such, it's no longer "business". In that case you are also bypassing all rules of good development, mainly:

  • testing: Has this code been tested?
  • version control: Can you recreate the code which you deliver through your website?
  • traceability: Do you know which code you currently deliver? Or which code you delivered 2 weeks ago?

As Ratna recommended: Don't do it. When you go down that road, it's a clear sign of a broken development process, and you hope to fix it by just bringing new/"fixed" code to production, bypassing any lower environment.

Jörg

Avatar

Level 4

Thanks for highlighting the loopholes of the approach I had in my mind.  I don’t go that route. Thanks Jorg.