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

Different Template for Each Category

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-01-2006, 10:41 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default Different Template for Each Category

Hello,

I'm not sure of this is the right section to ask this question but it is related to templates so here goes.

I was wondering if there is anyway or if there is a hack that would allow each category have a different template.

For example if I wanted my website to have a picture of a car in my main banner while viewing the car category of my website, and my Motorcycle section to have a Motorcycle banner when viewing that category.

This way would also give you the flexibilty to change the title tags to specifically describe what that page is about.

Any help would be appreciated. Thanks in advance.
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #2  
Old 03-01-2006, 11:25 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default

You should be able to use an if statement.

Code:
{if $current_category.categoryid eq 1} Display Car Pic {elseif $current_category.categoryid eq 1} Display Motorcycle Pic {else} Normal Pic {/if}
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #3  
Old 03-01-2006, 11:45 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default

Hi Alltribes,

Thanks for the reply. I heard of this option however the pictures aren't my only reasoning behind doing this. I just used it as the main example so it would be easier to explain.

I would also like the flexibility of changing the title tags, changing the information on each category page, adding links on certain category pages and changing the links on others.

If I could be able to control the look of each page, many of these things can be accomplished.
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #4  
Old 03-01-2006, 08:57 PM
 
vixnfox vixnfox is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: Adelaide, South Australia
Posts: 82
 

Default

Hi,
as a start, you can change the look of a category menu PAGE by using your own CSS.
eg
I have a FAQS menu which reads:
{* $Id: faqs_menu.tpl,v 1.13 2004/05/28 12:21:09 max Exp $ *}
{section name=pg loop=$pages_menu}
{assign var="tmp" value = $pages_menu[pg].pageid}
{if $tmp > 2 }
<link rel="stylesheet" href="{$SkinDir}/skin1_myxcart.css">
{$SkinDir}
{$pages_menu[pg].title}

{/if}
{/section}

This changes the layout of all the items on the FAWS menu. You could easily filter on a per page basis something similar.

Hope this helps a bit.

VixnFox
__________________
V 4.3.1 Live:

Developing on
PHP 5.3.0
MySQL server 5.0.75-community-log
MySQL client 5.1.36
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11
Windows 7 64bit on a Toshiba Satellite P500

ADELAIDE, SOUTH AUSTRALIA
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 03:06 PM.

   

 
X-Cart forums © 2001-2020