I'm trying to include a custom .js file into Vanilla 2 but i don't want to modify any of the core files like class.vanillacontroller.php. Has anyone done this successfully?
Note, i found one way that worked, its not exactly what i wanted but if you include a link to your .js file in your default.master.php it will work. But i'm still looking for a way to include a .js in the theme folder...
Comments
- Add your custom.js to /themes/Patric/js/custom.js
- Create a file called /themes/Patric/class.patricthemehooks.php
- Add the following to the php file:
Themes are always searched for js and css files first so your custom.js will always be given the highest priority.Vanilla co-founder
This will be very useful :-)