I am trying to set the background color of every other
You could do this in CSS by using However, this will not work on older browsers. I am not using a for-each loop since I am using a few templates to filter data based on the nodes
:nth-child([even/odd])
:tr:nth-child(even) td {
background-color: #fff;
}
tr:nth-child(odd) td {
background-color: #ccc;
}