"a template that apply" is incorrect. Probably should be one of the following:
`a template that applies`
or
`a template that is applied`

I think that the last one is best in this case.