This not something what is handled in the outer template.ftl, because it’s only relevant at places where a password is requested, and that’s not always the case.
Have a look into e.g. the login.ftl, there you’ll find a <#if realm.resetPasswordAllowed> expression.
Well, then use it on the template.
I just wanted to point to an example where this is used, but you can implement your own logic in the template.ftl like you desire.