2

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 1

3

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");
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.