Need to add JS to <head> tag
I'd like to add this to my <head> tag for all pages...
<script type="text/javascript" src="http://mysite.com/custom.js"></script> <link rel="stylesheet" type="text/css" media="screen" href="http://mysite.com/custom.css" /> I've been searching this forum for well over an hour and I just can't seem to find success. I thought I had it when I found out about common_files/meta.tpl. I've been trying to alter that file, but the changes I'm making don't seem to be showing up. Anyone lend a hand? Many thanks! |
Re: Need to add JS to <head> tag
You can add to skin/your_skin/customer/service_head.tpl, if that file doesn't exist in your skin then common_files
|
Re: Need to add JS to <head> tag
Thanks! That helped a lot. I've found service_head.tpl file (under skin/common_files/customer/) and I can definitely see that's where this business is done.
My problem now is actually loading the files properly. I don't think I quite understand the syntax of the X-Cart short code language. In order to pull in this file as I normally would... <link rel="stylesheet" type="text/css" media="screen" href="http://mysite.com/custom.css" /> ... do I need to put brackets around the statement? Or is it necessary to phrase it like this... {load_defer file="http://mysite.com/custom.css" type="css"} ? Actually there's not that much code in my css file -- could I just insert some CSS straight into service_head.tpl? If so how would that be formatted? Thanks again for sharing your expertise and suffering through my newbness! :-) |
Re: Need to add JS to <head> tag
You can insert them as you have them in the first post or using the load_defer, either way will work. Use relative paths though
|
Re: Need to add JS to <head> tag
Indeed!! All done. Thanks again Steve.
|
All times are GMT -8. The time now is 07:18 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.