| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to add CSS to <Head></Head> | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to add CSS to <Head></Head>
Hi,
A lot of 3rd party jQuery/Javascript plug-ins require you to put a line of code in between the <head> </head> tags. For example, I have a 3rd party Google Maps Plugin that I want to use in a Static Page. It requires me to put the line: <link rel="stylesheet" type="text/css" href="revolution/css/layers.css"> in between the <head> </head> tags. My question: Where is the <head> </head> tag located? Is there a specific template file for static pages where I can find the <head></head> tags? I am using X-Cart Classic 4.7.5
__________________
X-Cart v4.4.3 Gold X-Cart Mobile |
|||||||
#3
|
|||||||
|
|||||||
Re: How to add CSS to <Head></Head>
Quote:
If I need to add javascript, or a link to a .js file between the <body> </body> tags, do I also add it in home.tpl? For example, if I need to add: <script src="example.js"></script> do I add it in home.tpl as well?
__________________
X-Cart v4.4.3 Gold X-Cart Mobile |
|||||||
#4
|
|||||||||
|
|||||||||
Re: How to add CSS to <Head></Head>
__________________
Sincerely yours, Sergey Fomin X-Cart team Chief support group engineer === Check this out. Totally revamped X-Cart hosting http://www.x-cart.com/hosting.html Follow us: https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: How to add CSS to <Head></Head>
If the css and/or js isn't needed on every page, and is only required on one page/place, you might want to add an if statement so it isn't called on every page.
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#6
|
|||||||
|
|||||||
Re: How to add CSS to <Head></Head>
Quote:
Hmm, that sounds like a good idea. So for example, if I needed to call the css (sample.css) and js (sample.js) on only 1 of my static pages, say an FAQ page(www.domain.com/faq.html), how would the if statement look?
__________________
X-Cart v4.4.3 Gold X-Cart Mobile |
|||||||
#7
|
|||||||||
|
|||||||||
Re: How to add CSS to <Head></Head>
{if $page_data.pageid eq XX} load {/if}
Where XX is the static page id
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|