X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Adding a HTML tag to the <head> (https://forum.x-cart.com/showthread.php?t=71241)

Tiernan 02-11-2015 01:05 PM

Adding a HTML tag to the <head>
 
Hey!

I've just starting using X-Cart 5.1 and I am trying to add a Google Font to the <head> because it won't work when I use the @import method on the custom css.

I've been looking in skins/default/en/header and in the common folder but I can't find it. How do I add it?

Thanks. :)

totaltec 02-11-2015 03:01 PM

Re: Adding a HTML tag to the <head>
 
First of all, do not modify any core files! You need to create a module, and then make your changes in your module.

I believe that the <head> section is a list. So to add your new template to the list you would put:
Code:

{**
 * Head list children
 *
 * @author    Qualiteam software Ltd <info@x-cart.com>
 * @copyright Copyright (c) 2011-2014 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
 * @license  http://www.x-cart.com/license-agreement.html X-Cart 5 License Agreement
 * @link      http://www.x-cart.com/
 *
 * @ListChild (list="head", weight="100")
 *}

at the top of your template file.

Then you can include your link in the template like this:
Code:

<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>


All times are GMT -8. The time now is 09:18 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.