I had added JS and CSS in the views module using the .info method. Made JS and CSS file in the views module file (as sites/all/modules/views/jsfile.js & sites/all/modules/views/cssfile.css
) and attached it through views.info
file. It was working fine. But today got an update notification of views module and updated the views and those all customized css & js things gone. Code was small so I made it again. But what is the right way to do this? So on update it will not go away? I believe adding css & js by .info
method also a one of standard method.
Add a comment
|
1 Answer
That is why you should never do any modification to a module. The proper way to do this is to add the js and css to your custom theme using the same method you have done for views. It is strongly discouraged to modify module or add anythings to the module otherwise on update all the changes will be lost.
-
Hmmm, I will add the JS and CSS in theme file and will check whether my js and css working or not. Very thanks.– CodeNextCommented Nov 6, 2015 at 20:57