template check before rendering (within view)