Subcategories unique class - Joomla! Forum - community, help and support


hi everyone,
i add style each of subcategory depending on category id.
i found online should use: <div class="category-<?php echo $this->category->id; ?>">
catproblem01.jpg

my template master bootstrap.
it kind of works:
catproblem.jpg

it's view main category.
but behaves strange example add 2 articles same subcategory within different div class therefore have different background colors.
it gets more complicated when enter subcategory colors change again.

catproblem02.jpg


i need add books different subcategory , show (on main category , subcategories) background color
.category-16{
background-color:#36fa80;
}
that belongs subcategory.
can please guide on how it?

kind regards,
matt






Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support