Different template colors on two block (Page List)

Permalink 1 user found helpful
Hi!
I have two Page List in the same area (only for study purpose).
I have a custom template that colors the font green.
When I assign this custom template to one Page List, also changes the color of the second Page List.
Note that changes only the color, but the template remains.
It's normal?

p.s. the view.php is a copy of the default block in concrete/blocks/page-list,
The color is setted in this css file:
.ccm-page-list a {
   color: #009926;
   text-decoration: none;
}

 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
You need to add scope to the html and css, so in the view.php, wrap the page list in a div with style
<div class="template-a">
...
</div>


Then in the corresponding view.css, scope it so
.template-a .ccm-page-list a{
...
}


Then do similar for template B, but with the styles you want for B.

It doesn't have to be a DIV, you could similarly add the scoping class to a UL element or anything convenient and relevant.