X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Welcome.tpl modification (https://forum.x-cart.com/showthread.php?t=62121)

JoeS 12-24-2011 07:48 AM

Welcome.tpl modification
 
I have a 1050px width website and I need to insert a 1050x300 image straight under the search bar, I inserted the image into the welcome.tpl file but it was placed between the sides columns. I appreciate help in how to make my welcome.tpl file able to display my "website width" image between the search bar and the rest of the page. There could be another way but I only think of modifying the welcome page to do the job. Thanks and Merry Xmas

BillV 12-24-2011 09:23 AM

Re: Welcome.tpl modification
 
Not sure what template you are using but you could try to add it somewhere in the header.tpl file. The welcome.tpl displays in the main body of the page.

JoeS 12-24-2011 12:02 PM

Re: Welcome.tpl modification
 
Thanks for the reply but if add the image to the head.tpl it will stay wherever you navigate within the website and it should only be on the home page.

BillV 12-24-2011 12:31 PM

Re: Welcome.tpl modification
 
I am kind of new at this myself but I believe you could use an "if" statement to include it only on the home page. Something like this:

Code:

{if $main == "catalog"}
show image
{/if}


JoeS 12-24-2011 12:36 PM

Re: Welcome.tpl modification
 
Yes this a good idea.. do I add this statement to the home.tpl? or head.tpl?

BillV 12-24-2011 01:24 PM

Re: Welcome.tpl modification
 
I would put it in the header.tpl. I am only familiar with v 4.4.4 so I'm not sure if this is right for your situation. You may have to experiment a bit to get it where you want.

ARW VISIONS 12-24-2011 01:57 PM

Re: Welcome.tpl modification
 
I would put in in home.tpl just below where you see
{include file="customer/head.tpl'}

if you put it in head you might need to change the css also.

this is the correct code to display it only on the home page.

{if $main eq "catalog" && $current_category.category eq ""}
put your image code here.
{/if}

JoeS 12-24-2011 02:10 PM

Re: Welcome.tpl modification
 
Spot on 100%. Thanks ARW

ARW VISIONS 12-24-2011 07:25 PM

Re: Welcome.tpl modification
 
my pleasure


All times are GMT -8. The time now is 11:50 AM.

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