![]() |
Adding some javascripts
I need to add a simple slideshow to the front page of my client's site, but I'm not sure how to do that. I've got a javascript that needs to be called, and then I just put an ID in the image to start the rotation. With all the templates and includes I'm not sure where to stick the JS.
|
Re: Adding some javascripts
JS probably goes in the <head> tag, which is in customer/home.tpl. Then add the actual slideshow part to customer/main/welcome.tpl
|
Re: Adding some javascripts
I'm getting smarty errors in the head.
Error: Smarty error: [in customer/home.tpl line 42]: syntax error: unrecognized tag: curImg++; if(curImg > imgNum) { curImg = 0; (Smarty_Compiler.class.php, line 436) in /home/protecht/public_html/Smarty-2.6.12/Smarty.class.php on line 1095 I'm not a programmer really, so I'm not sure what to do with this. Does anyone have a good basic slideshow script they've used successfully on the cart? |
Re: Adding some javascripts
You simply need to put {literal} tags around your JS:
{literal} Javascript code here {/literal} |
Re: Adding some javascripts
Quote:
Thanks! I appreciate your help on this and other posts. There's a lot to X-Cart and I can't know everything! |
Re: Adding some javascripts
Quote:
There sure is :) |
All times are GMT -8. The time now is 02:51 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.