2013-01-06 146 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; 
}