2013-01-06 147 views
0

我在magento(tintinportintin.com.br)有一个商店,我想自定义类别页面,为每个类别页面添加特定颜色。例如,我希望家庭和所有页面的菜单在类别x中是蓝色的,在类别y中是红色的。谁能帮我?自定义类别页面

回答

0

html body标签包含每个类别的类名,所以一种无编程方式来做到这一点,就是使用css。

<body class=" catalog-category-view categorypath-pulseiras-casual-html category-casual">

<body class=" catalog-category-view categorypath-colares-html category-colares">

在你的style.css

所以(你可以添加到末尾)

.categorypath-colares-html #nav{ 
    background-color: black; 
} 

.categorypath-colares-html #nav a{ 
    color:red; 
} 

.categorypath-pulseiras-casual-html #nav a{ 
    color:blue; 
} 

.categorypath-pulseiras-casual-html #nav{ 
    background-color: black; 
} 

(唯一的限制是,如果你改变类别名称,那么你将需要更新css)

+0

我应该在自定义布局更新框中添加此,在分类管理页面? –

+0

我会将它添加到/ skin/frontend/default/{local主题} /css/styles.css –

+0

对不起,但没有解决。 –

0

在我的商店指的style.css文件到#nav

/* Classes specifying background and other settings for navigation bar */ 
.navbar { 
    background-position:top left; 
    background-repeat:repeat-x; 
    float:left; 
    width:944px; /* 944 = 960 - 2*8 */ 
    height:41px; 
    padding-top:10px; 
} 
.navbar-left { 
    background-position:0 -51px; 
    width:8px; 
    height:51px; 
    float:left; 
} 
.navbar-right { 
    background-position:100% -51px; 
    width:8px; 
    height:51px; 
    float:left; 
} 
0

我的style.css指的是导航背景:

.categorypath-colares-html #nav{ 
    background-color: #b7ea2c; 
background:url(../images/img/navbar-lightgreen.png) no-repeat; 
} 

.categorypath-colares-html #nav a{ 
    color:#b7ea2c; 
}