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)
-   -   Different Template for Each Category (https://forum.x-cart.com/showthread.php?t=20245)

Makaveli 03-01-2006 10:41 AM

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.

Alltribes 03-01-2006 11:25 AM

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}


Makaveli 03-01-2006 11:45 AM

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.

vixnfox 03-01-2006 08:57 PM

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


All times are GMT -8. The time now is 03:45 AM.

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