| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Adding tabs to welcome page | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Adding tabs to welcome page
I am using Smart Template, it comes with a lot of js files.
On the main part of my website (the HTML side outside of xCart) I have an option for adding tabbed boxes (see pic), so I have the necessary js files and scripts to do this. I'm wanting to add these tabs to my xCart home page, but to do this as it is on the HTML part of the site I have to post the "link href" to the js file in the head of the document (welcome.tpl doesn't have a <head></head>). I added <head> tags along with the code when I attempted to put these tabs in; it seemed okay. But then I have to add this script to the page, and this is where I had a problem, it produces a smarty error. PICTURE OF WHAT I AM TRYING TO ADD: CODE CAUSING PROBLEM: HTML Code:
So, here's my problem. I really want to add these little tabs but am not sure how it can be done. Anyone have any ideas? Anyone know of a mod that will let me do this? Anyone up for hire? I'm stuck!! Thanks,
__________________
(1) xCart (1) xPayments 2-12-14 FOR SALE |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Adding tabs to welcome page
You should not add additional <head></head> tags to the page. You can use webmaster mode to see the template which is creating the code for the <head> section of you page. It could be customer/service_js.tpl
When you add javascript to a smarty template, you should surround it with {literal} {/literal}. This is because javascript and smarty share common syntax, so you need to tell smarty not to interpret your javascript. (Otherwise - it sees you javascript code as smarty code.) If you only want a block of code to show up on your home page, you can put it inside an if/than statement. Take a look at/customer/home_main.tpl file for some examples of conditions that will display only on certain pages. You probably want the same condition that includes welcome.tpl: {if $main eq "catalog" and $current_category.category eq ""} ---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|