This object is in archive! 
How to override main.js for each of the sections
I am needing to override the main.js files to add functionality when someone click the section icon in the modal. I thought could modify view themes/module , but it does not work. How would I go about this?
Denis,
On the first point here is what I am needing to do. I am adding
to the main.js file for (ideas, problems, thanks, questions) as part of a customization to the behavior when each module tab is click in the modal. So adding js to the assets/js is less than optimal.
For modify modules do have to put in full paths to get to the js / css files. I not in the modules there are
Which point to the main files and not my module override paths. Ideally I though that if I created /module/js , that it would override and use mine. So guess not sure how to best to reference my custom css and js within a new template.
Denis,
On the first point here is what I am needing to do. I am adding
to the main.js file for (ideas, problems, thanks, questions) as part of a customization to the behavior when each module tab is click in the modal. So adding js to the assets/js is less than optimal.
For modify modules do have to put in full paths to get to the js / css files. I not in the modules there are
Which point to the main files and not my module override paths. Ideally I though that if I created /module/js , that it would override and use mine. So guess not sure how to best to reference my custom css and js within a new template.
Hello Kevin,
In order for you to use new css and js in theme, you don't need to stick to any module, but use global script.js located in/assets/js
So that js file will load and be used system wide. The same is with css file in theme.
As I can see, you are going in the wrong direction, as this method is incorrect /module/js
Please review Themes and Customize Interface articles to get more information on theme development.
Hello Kevin,
In order for you to use new css and js in theme, you don't need to stick to any module, but use global script.js located in/assets/js
So that js file will load and be used system wide. The same is with css file in theme.
As I can see, you are going in the wrong direction, as this method is incorrect /module/js
Please review Themes and Customize Interface articles to get more information on theme development.
Stas,
Thanks. Yeah I kinda figured that on the modules. Though it made logical sense from an override perspective.
It was the issue of doing a override of existing js that makes the global js files more difficult because I have to add additional jQuery listeners for elements which just adds unecessary bloat. But no worries I'll make it work.
Stas,
Thanks. Yeah I kinda figured that on the modules. Though it made logical sense from an override perspective.
It was the issue of doing a override of existing js that makes the global js files more difficult because I have to add additional jQuery listeners for elements which just adds unecessary bloat. But no worries I'll make it work.
Hi Kevin,
Glad that you figured it out. Hope customization won't bring you much trouble.
Have a great day
Hi Kevin,
Glad that you figured it out. Hope customization won't bring you much trouble.
Have a great day
that is what version control is for :)
thanks
that is what version control is for :)
thanks
Replies have been locked on this page!