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

Category Name Within Template

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-30-2006, 07:47 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default Category Name Within Template

Hello,

Does anybody know the code that I can place within a X-cart template that will display the appropriate category name?

I know some templates already have this code that will make the appropriate category name appear on the page, but I can't seem to find it.

I would like to add this code to other template pages as well.

Thanks in advance.
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #2  
Old 05-30-2006, 07:49 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

It depends on where....where would you like to add it?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-30-2006, 08:04 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default

Hi Balinor,

Thanks for the reply. My cart is customized so that each category has it's own template so that I can change the look of each template.

Basically I am making copies of the home.tpl, editing it and renaming the file. I would like to add the category names within these templates.

Thanks!
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #4  
Old 05-30-2006, 08:19 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

So you are looking for the code for the current/active category?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 05-30-2006, 09:12 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default

Yes, that's exactly what I am looking for.
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #6  
Old 05-30-2006, 09:24 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Try:

{$current_category.category}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 05-30-2006, 09:31 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default

Sweet! It worked. Thanks a lot Balinor. I really appreciate your help!
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #8  
Old 06-02-2006, 09:28 AM
 
furthermobile furthermobile is offline
 

Newbie
  
Join Date: May 2006
Posts: 4
 

Default Show main category?

I'd like to do something similar but slightly different. I need to show the main category that the product belongs to. I want to show this right next to the product name in the products.tpl template. Showing the current category wont really work since it would change in the subcategories. Any suggestions would be greatly appreciated. Thanks in advance.

x-cartpro v4.1.1 [unix]
__________________
Jamie
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 01:42 AM.

   

 
X-Cart forums © 2001-2020