Guest Posted May 6, 2014 Share Posted May 6, 2014 (edited) Hey guys, I was wondering if there is an easy way to add a js file to the head of a CMS page? Is there a way to do it via smarty if command on header.tpl? Do I need to edit CMSController.php? Edited May 6, 2014 by Guest (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2014 Share Posted May 6, 2014 {if $smarty.get.id_cms==20} <script src="your js library"> {/if} add this simple code to cms.tpl file 1 Link to comment Share on other sites More sharing options...
Guest Posted May 6, 2014 Share Posted May 6, 2014 Worked perfectly! Thanks for your help vekia! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now