Retain a reference to the template viewer.