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)
-   -   Altering location.tpl & removing from home page only (https://forum.x-cart.com/showthread.php?t=48805)

sparrowdog 07-25-2009 02:35 AM

Altering location.tpl & removing from home page only
 
At http://server.npserver2.com/~shop/ I have put the breadcrumbs back on my site, and have altered them (putting the words "You Are Here" in front) in the location.tpl file. I also know how to alter the css, so I'm fine there.

What I can't figure out how to do is to change the 'Shop Naturally Healthy Households' to say HOME instead. I know changing the company name will do this, but I can't have the word HOME inserted everywhere I need the company name to go.

I also don't want the breadcrumbs to display on the front page, but I want them everywhere else. How do I do this? I have seen it done on other sites.

Do I have to remove {include file="location.tpl"} from it's current spot on the customer/home.tpl file and put it in the product and the category pages by hand? I'm just not sure which templates and where, each time I have tried, I failed.

Version 4.1.11

Thanks :)

amy2203 07-25-2009 03:01 AM

Re: Altering location.tpl & removing from home page only
 
see if this helps,

http://forum.x-cart.com/showthread.php?t=48758&highlight=homepage

sparrowdog 07-25-2009 03:51 AM

Re: Altering location.tpl & removing from home page only
 
I actually want to exclude something from the homepage, and also need to change the name of the shop in the first part of the breadcrumb. I couldn't find anything in that post to help me. Thanks for the pointer though. That may come in handy elsewhere.

amy2203 07-25-2009 03:54 AM

Re: Altering location.tpl & removing from home page only
 
well, you want to test for the homepage, and if it's not the homepage, display the breadcrumbs...

sparrowdog 07-25-2009 04:15 AM

Re: Altering location.tpl & removing from home page only
 
I don't understand exactly where this code is supposed to go. While I'm not too bad customising x-cart, the understanding of this particular piece of code is beyond me. I know very little about PHP.

carpeperdiem 07-25-2009 04:16 AM

Re: Altering location.tpl & removing from home page only
 
Quote:

Originally Posted by sparrowdog
I actually want to exclude something from the homepage, and also need to change the name of the shop in the first part of the breadcrumb. I couldn't find anything in that post to help me. Thanks for the pointer though. That may come in handy elsewhere.


The if statement for the homepage is:

{if $main eq "catalog" and $current_category.category eq ""}

make sure you put a closing {/if}

You can also use an {else} or {elseif}

Read all about if/then statements here:

http://forum.x-cart.com/showthread.php?t=8881

amy2203 07-25-2009 04:33 AM

Re: Altering location.tpl & removing from home page only
 
Quote:

Originally Posted by sparrowdog
I don't understand exactly where this code is supposed to go. While I'm not too bad customising x-cart, the understanding of this particular piece of code is beyond me. I know very little about PHP.


In your home.tpl..

you need an if statement so IF its the homepage, don't put the location ELSE put the location file

sparrowdog 07-25-2009 05:42 AM

Re: Altering location.tpl & removing from home page only
 
Ah, now I'm grasping the concept. It's almost midnight here. I think I might sleep on it and start fiddling with the code in the morning.

Thanks for your help. Always good to learn a new trick :)


All times are GMT -8. The time now is 12:14 AM.

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