Expand my Community achievements bar.

Adding "channels" to cq:widgets clientlibrary

Avatar

Level 2

While analyzing a bug, I have realized that cq:widgets client library that comes OOTB in AEM is not loaded in Mobile/Tablet. Reason is: channels are limited to "extjs and ie6". But we need to add "touch" category to make it load in mobile/tablet. 1370692_pastedImage_0.png

How can we overlay this and add the channels with minimal change? and not changing directly in libs.?

8 Replies

Avatar

Level 10

Checking this internally. I have not seen this use case.

Avatar

Level 10

You can overlay this clientlib in /apps and add this property

Note- Remove the js.txt from destination path, else it will load client lib twice on page

Avatar

Level 2

This approach doesnt work for "cq:widgets" client library. Can you please confirm if you have done this.

Avatar

Level 10

What are you trying to load exactly in Mobile - the Touch UI is built for Mobile and there should be no issue.

Avatar

Level 2

We are trying to load client library with category name - "cq.widgets". It works fine in desktop but not in mobile/tablet. The reason being, the channels property does not include "touch" for this client library.

Avatar

Level 10

AFAIK, overlaying a clientlib is not dependent on any specific category.

Yes,

  • You can copy /libs/cq/ui/widgets /apps/cq/ui/widgets.
  • Remove js.txt from /apps/cq/ui/widgets
  • It will load files from /apps/cq/ui/widgets

You should be able to make further changes in overlayed file.

Avatar

Level 2

The issue with this approach is that we will be loosing the further enhancements that are made into cq.widgets. As there are many functioonalities dependent on /libs/cq/ui/widgets, we dont want to loose the future enhancements.

Avatar

Level 10

As per recommended approach and to keep things clean, you should not be making any changes in /libs

Now the way you add your functionalities it by overlaying things and that hold true for JS, JSP, dialog etc.

Since AEM does not provide over the air updates, so when you upgrade to new version, install CFP, SP you should have a step to consider changes in overlay.

Also since it belongs to classic ui, I don't thinks so there will be any major update now as its already planned to deprecate.