templates before view