Set three levels of inheritance in the template