Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Altering location.tpl & removing from home page only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-25-2009, 02:35 AM
 
sparrowdog sparrowdog is offline
 

eXpert
  
Join Date: Jan 2007
Posts: 244
 

Default 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
__________________
Version 4.1.6 to 4.1.11
Reply With Quote
  #2  
Old 07-25-2009, 03:01 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

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

see if this helps,

http://forum.x-cart.com/showthread.php?t=48758&highlight=homepage
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #3  
Old 07-25-2009, 03:51 AM
 
sparrowdog sparrowdog is offline
 

eXpert
  
Join Date: Jan 2007
Posts: 244
 

Default 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.
__________________
Version 4.1.6 to 4.1.11
Reply With Quote
  #4  
Old 07-25-2009, 03:54 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default 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...
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #5  
Old 07-25-2009, 04:15 AM
 
sparrowdog sparrowdog is offline
 

eXpert
  
Join Date: Jan 2007
Posts: 244
 

Default 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.
__________________
Version 4.1.6 to 4.1.11
Reply With Quote
  #6  
Old 07-25-2009, 04:16 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #7  
Old 07-25-2009, 04:33 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default 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
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #8  
Old 07-25-2009, 05:42 AM
 
sparrowdog sparrowdog is offline
 

eXpert
  
Join Date: Jan 2007
Posts: 244
 

Default 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
__________________
Version 4.1.6 to 4.1.11
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:08 AM.

   

 
X-Cart forums © 2001-2020