We are trying to customize the tagpicker widget which is available OOTB (/libs/cq/gui/components/common/tagspicker) for our requirement as we don't use the AEM tags in our platfrom. As part of this change, we want to customize the type ahead available in the tagpicker to pull the tags from external system. To achieve this, we have tried overridding the file "/libs/cq/gui/components/common/tagspicker/clientlibs/tagspicker.js" by copying it to the apps folder as "/apps/cq/gui/components/common/tagspicker/clientlibs/tagspicker.js". To test the overridding, i have changed the result count to 10 from 50 in the file. I see the same change on the developer tools when i browse for the tagpicker.js. However, the call that is going to pull the tags still have count set to 50. We strongly suspect that we might be refering to a wrong file.
We would really appreciate if someone can direct us to the right file which can be overriden to customize.
You can't override js files like copying from libs to apps.
To referred custom js you need to go to js.txt file and changed the reference to your js file.
Please use ?debugClientLibs=true with URL to check individual files in browser console.
Thanks for the inputs. After appeding the ?debugClientLibs=true to the URL, we were able to find out that the file that we were referring to was a wrong one. Now, we have the below question.
We would like to customize the tagpicker widget that is available on the OOTB page template (/libs/foundation/components/page) to pull the search results from a servlet path instead of AEM tags folder. For which we see two tagpickers that are available.
Could you please let us know which one need to be customized for our need. We see the "sling:resourceType" is mentioned as "cq/gui/components/common/tagspicker". However, the tagpicker.js is actually picked from the path "/libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker" and both have the same content.
Any inputs would be highly appreciated.
I can't see any js file at /libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker/clientlibs
I am using AEM 6.3. Can you try to changes at /libs/cq/gui/components/common/tagspicker and check if doesn't work let me know where you want changes for custom result. so that I can check and let you know the exact file.
My Bad. I would have mentioned the version of the AEM that we are using. We are on AEM 6.2 SP1. In the Libs folder we have the file "/libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker" which has a logic to make a call on typing a keyword in the tagpicker field.
We would like to make this call to call our custom servlet. We would like to know if this file can be customized and would it have any impact on the pathpicker widget.
We really appreciate your prompt responses.