Best Practice to include JS/CSS at all pages - upgrade safe way

Hello ,
I want to include some custom JS/CSS to all pages of suitecrm, but i am not sure what is the best practice to do so.

i searched the forum and found the best way is to include the Files at the metadefs for the module’s view.

But this doesn’t help me since i want to include the files at all suitecrm pages.

i thought about putting the files at custom/theme/SuiteP and override the footer.tpl or head.tpl for example.

But, i am not sure if this will be upgrade safe since i am overriding the old copy of the file , so if any changes occurs at theme tpl file, it will be overrided by the olld copy that was found at custom/themes directory

Thank you

If i remember well:

For css you can use style.css file and style.js for javascript inside custom theme folder

“custom/theme/SuiteP/css/style.css”
“custom/theme/SuiteP/js/style.js”

Repair and rebuild and you can see your css and js rules in all the pages

(use develop mode from system setting for not rebuild every time you change custom css and js files content)

bye

1 Like

Thank You, it working