Override /etc/clientlibs/granite js | Community
Skip to main content
Level 2
October 16, 2015
Solved

Override /etc/clientlibs/granite js

  • October 16, 2015
  • 3 replies
  • 1776 views

Hi,

How to overlay jquery/underscore or any other js in my application which is under /etc/clientlibs/granite. 

Options I have tried which didn't workout:

1) Under /etc/designs/<my-site> created a clientlib with same categorie name as "jquery/underscore" under /etc/clientlibs/granite.

2) Created a underscore.js file in /etc/designs/<my-site>/<my-clientlib> which is added in js.txt

Note: When we tried to overlay some widgets js under "libd/foundation", the same folder structure we created under /apps/<mysite> and that worked.

 

Thanks in advance.

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 Sham_HC

Out of the box there is no option to overlay /etc.  Create a sperate category library & include same in your template. 

3 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Out of the box there is no option to overlay /etc.  Create a sperate category library & include same in your template. 

Level 2
October 16, 2015

"If include in template" here means direct <script> tag inclusion in jsp ? This is not working as granite js is overriding this js.

Creating seperate category library - Do you mean clientlib category ? If yes what is the path I need to create under /apps and /etc ? But I tired both, that is not working.

The below way it is working:

Created /etc/clientlibs/<mysite>/<jsfile>

Added this js category in /etc/designs/<mysite>/<myclientlib> as dependecy.

Can we use the above approach ?

Sham_HC
Level 10
October 16, 2015

yes