Switch class/cssID template assignment

By this change it fixes an issue which occurs when assigning content element data to the template by reference.