before template