add view function to check template exist