In Magento2, is there anyway to add a CSS class to the body tag of a category page IF that category has no children?

I want to apply some design changes to only final-depth categories while avoiding having to assign each of those categories with a new layout.

The site I'm working on has a ton of categories so I'm looking for an automated solution.

Your Answer

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

Browse other questions tagged or ask your own question.