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

Unique text on category template?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-13-2004, 07:22 AM
  RJC's Avatar 
RJC RJC is offline
 

Advanced Member
  
Join Date: Nov 2003
Posts: 57
 

Default Unique text on category template?

I apologize if this has been addressed before, but I couldn't find anything here on the boards...

Let's say I have a category called Fruit. If I wanted to display a message on that page utilizing the category name, I would add "Look at our wonderful selection of {$current_category.category} on the customer/home.tpl. Obviously, this would appear on all categories, whether they were fruit, cars, books etc.

Now, if under Fruit I have a sub-category "Apples," the problem I am having is that message is displaying there as well, so the message "Look at our wonderful selection of Apples" would print on the sub-category page..which I don't want.

How could I either:

1. Not have this message appear at all on the sub-category's page or

2. Have this line pull the name of the parent category, so it would still say "Fruit" and not "Apples."

Am I putting this line on the wrong template to begin with? I'm new to Smarty (obviously), and am confused as hell!!

I am currently testing version 4.0.2. Thanks in advance!

Rich
Reply With Quote
  #2  
Old 08-16-2004, 12:43 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

you should make use of the array that builds the navigation menu.

Code:
{$location[0].0}

That will give you the name of the main root category
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 08-16-2004, 12:49 PM
  RJC's Avatar 
RJC RJC is offline
 

Advanced Member
  
Join Date: Nov 2003
Posts: 57
 

Default

Thanks for the reply...this was one of those things that I figured out about 10 minutes after I posted this (and about 4 hours of banging my head off the desk before that..). I actually did it a bit differently, creating and calling an alternate template (home1.tpl) and php file (home1.php). Works like a charm, though I guess I could have done it in an easier fashion
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 05:55 AM.

   

 
X-Cart forums © 2001-2020