| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Different skin for different categories | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Hi there,
a client of mine, would like his shop to have a different look when a user is browsing "Men's categories" and a different look for another category. Is this something doable and how can I make it work ? Thanks !
__________________
Carpe Diem |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() You can use an if statement that will load different css file based on current category
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Thanks, I will try that !
__________________
Carpe Diem |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() I tryed:
{if $current_category.categoryid eq "Name of categories1"} <link href="{$SkinDir}/main.css" rel="stylesheet" type="text/css" /> {elseif $current_category.categoryid eq "Name of categories1"} <link href="{$SkinDir}/mainORIGINAL.css" rel="stylesheet" type="text/css" /> {else} <link href="{$SkinDir}/main.css" rel="stylesheet" type="text/css" /> {/if} did not work. also tried name of style sheet. {if $current_category.categoryid eq "Name of categories1"} {$SkinDir}/main.css {elseif $current_category.categoryid eq "Name of categories2"} mainORIGINAL.css {else} main.css {/if} Added to skin1/customer/home.tpl Maybe location is wrong maybe syntax? Maybe I need to ad categories ID instead of Name of categories? Any advise? Thank you.
__________________
|
|||||||||
#5
|
|||||||||
|
|||||||||
![]() categoryid is a number not a text. You can open a cat in admin for editing and look at the url - it will say categoryid=xxx, thats the categoryid number
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() if you click on the category in the admin section and the look at the URL it will show you teh cat id.
so {if $main and $cat eq '255'} this {esle} that {/if}
__________________
xcart 5.1.2 |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() Hello Ashley.
In what file I should use this statement? Thank you for your help.
__________________
|
|||||||||
#8
|
|||||||||
|
|||||||||
![]() Quote:
I posted working if elseif statement and it might solve your problem. Still need to figure out how to apply same style to all main categories and child subcategories and it's pruducts without repeating else if over and over. read this:http://forum.x-cart.com/showthread.php?p=277733#post277733 thank you.
__________________
|
|||||||||
#9
|
|||||||||
|
|||||||||
![]() if else statement was added to skin1/customer/home.tpl
and seems to work fine.
__________________
|
|||||||||
#10
|
|||||||||
|
|||||||||
![]() Quote:
Hi, firstly thanks for the post, i was half way though attempting this... well i say half way i knew i need an {if} statement just wasnt to sure on how to implement it i have done it now but have 2 small issues i have placed my code {if $main and $cat eq '8'} <link href="{$SkinDir}/main1.css" rel="stylesheet" type="text/css" /> {else} <link href="{$SkinDir}/main.css" rel="stylesheet" type="text/css" /> {/if} in home.tpl just after </head> and it seems to be working fine however i just wanted to know is this the correct positon to place the code as when i am using the flyout menus option.... the menus won't align properly, the triangle icon overlaps the catagory text i have adjusted things in the flyout menus.css and can move the triangle icon around a bit but can not seem to get things to align as they should i just wondered if anyone else has had the same problem and solved it or any advice incase there is something i have overlooked or maybe the code is not in the correct place in home.tpl (i have tried it in various loacations) thanks in advance
__________________
X-cart v4.3.1 X-cart v4.4.3 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|