or, whether I locate them at the same level as the custom component, or nest them beneath the component etc., what is the "defacto standard" for experienced AEM developers? When I look throughout the JCR at the existing AEM components, (i.e. those that come with AEM out of the box), I see folders sometimes named Clientlib, and at other times, Clientlibs and I want to be consistent and follow the established defacto standards to ensure that my changes get picked up/detected properly. I doubt this is why my changes aren't picked up immediately sometimes, (as it's probably just typical caching and weird CQ/AEM behavior), but thought I'd ask to be certain I don't cause myself problems going forward.
Solved! Go to Solution.
Views
Replies
Total Likes
It does not matter what you name the folder, just as long as it's defined as a ClientLibraryFolder, it'll work.
Views
Replies
Total Likes
It does not matter what you name the folder, just as long as it's defined as a ClientLibraryFolder, it'll work.
Views
Replies
Total Likes
Agree with leeasling - most important thing is you use a node type of cq:ClientLibraryFolder and you define the categories property.
Views
Replies
Total Likes
Thanks so much for the prompt reply gentlemen! I'm guessing that it really doesn't matter where I locate it in the component node hierarchy either, correct? Even so, please share what the defacto standard is for both the name, and where it's located so that I can follow the established norm.
Views
Replies
Total Likes
This explains it pretty well:
https://docs.adobe.com/docs/en/cq/5-6-1/developing/clientlibs.html
Views
Replies
Total Likes
au4liferz wrote...
Thanks so much for the prompt reply gentlemen! I'm guessing that it really doesn't matter where I locate it in the component node hierarchy either, correct? Even so, please share what the defacto standard is for both the name, and where it's located so that I can follow the established norm.
For the name, go with whatever you prefer. There is no right or wrong.
As far as where the client library can live, you can indeed put them under each component but you need to be careful. Typically on a dispatcher any request to /apps/ is blocked, meaning that any direct reference to a client library living under apps will result in a 404. If you do decide to put client libraries with their components, make sure in your main client library defined in your design that you embed the component categories.
Your node (in XML format) would look something like this:
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:ClientLibraryFolder" categories="[apps.projectName]" embed="[apps.projectName.components]"/>
Assuming your component client libraries were named as such, this would embed the component css/js so that it is not referenced from /apps/.
Views
Replies
Total Likes
Lee has pointed out a right thing.
defacto is that clientlibs can have any name but the node type should be cq:ClientLibraryFolder and
there is no hierarchy to be maintained, once you have categories defined for your client library folder, it can be included in your component. But cautious of having it under apps and it would be better to have it under /etc/designs.
regards,
Lokesh
Views
Replies
Total Likes
Thanks again. I'll definitely put it under /etc/designs instead of directly off of the component folder hierarchy, (even though that's what most of the http://helpx.adobe.com tutorials tell you to do).
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies