My website has four categories and I have four different color of website's logo. How can I load the different logo file per category(considering their sub and products)?
1 Answer
Magento adds specific css-classes to the body depending on the category.
For example in the demo-store you will see the following body-classes:
Category Men:
<body class=" catalog-category-view categorypath-men-html category-men">
Category Accessories:
<body class=" catalog-category-view categorypath-accessories-html category-accessories">
You could set the logo via CSS background depending on the category
or categorypath
class:
.category-men .logo {
background-image: url("logo-men.png");
}
.category-accessories .logo {
background-image: url("logo-accessories.png");
}