Add template directive