| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Where do I place something in the head tag of the home page? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Where do I place something in the head tag of the home page?
OK, I give up! I am using v4.4.2 and working with the 'fashion_mosaic_grey' template. I need to place some JS in the head of my homepage, but can't figure out which file to place it in! I tried the customer/home.tpl file on both the common files folder and the 'fashion_mosaic_grey' area, but does not show up on final home page output. I figured out where the actual display part goes (welcome.tpl) and it is working fine.
I am sorry if I sound like I am complaining, but I am about ready to pull my hair out trying to figure out all this basic file location stuff! Why does it have to be so complex to do something so simple? Can someone please help me out! THANK YOU!
__________________
Demoing v4.4.2 for new site Licensed v4.0.19 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Where do I place something in the head tag of the home page?
Try disabling the "Do not check if templates are changed (Smarty compile_check)." option on the "General settings -> General options" page.
Also, try the "Webmaster mode" and "Firebug".
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#3
|
|||||||||
|
|||||||||
Re: Where do I place something in the head tag of the home page?
If still in development phase disable that option, you may also need for some template chages to appear to clear the cache - cleanup.php
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#4
|
|||||||||
|
|||||||||
Re: Where do I place something in the head tag of the home page?
Add it to the bottom of /common_files/meta.tpl using an if statement
{if $main eq "catalog" and $current_category.category eq ""} js {/if} This will only load it when on the homepage, I do this all the time for slideshows and such. Depending on the js, you could get conflicts. |
|||||||||
|
#5
|
|||||||
|
|||||||
Re: Where do I place something in the head tag of the home page?
Thanks guys! I got the JS to print to the head area.
I still have a problem (let me know if I should start another post?) I am in fact working on putting in a slide show on the home page of my site. My slide show is not working (had this code (similar) working in another (non-xcart) php site before). I think I have an issue with syntax in the .tpl file(s). In the "fashion_mosaic_grey/customer/main/wecome.tpl" file I put the following table: Code:
and in the "common_files/customer/meta.tpl" file I put this at the end: Code:
In the original code I found on DynamicDrive, there were brackets in place of the red and blue parenthesis in the second set of code above, but it didn't work (it didn't print the info between the brackets)(?maybe improper syntax for TPLs?) so I replaced with parenthesis which printed fine though I am not sure if the parenthesis work in the fadeshow code? Any ideas on this on this? Maybe what I need to do is get the brackets to print in the head? If so, how? Thank you!
__________________
Demoing v4.4.2 for new site Licensed v4.0.19 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Where do I place something in the head tag of the home page?
surround the scripts with {literal} {/literal}
http://www.smarty.net/docs/en/language.function.literal.tpl
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#7
|
|||||||
|
|||||||
Re: Where do I place something in the head tag of the home page?
Thank you! That did the trick!
__________________
Demoing v4.4.2 for new site Licensed v4.0.19 |
|||||||
|
|||
X-Cart forums © 2001-2020
|