Templeman volleyed his side in front on 77 minutes but John Ovenstone's header restored parity four minutes from time.
But Templeman completed his treble with virtually the last kick of the game to ensure Forfar stayed joint-second in the division.
Forfar: Gallacher, Lunan, McCulloch, Bishop, Tod, Martyn Fotheringham, Mowat, Iain Campbell, Gibson, Templeman, Deasley (Ross Campbell 82). Subs Not Used: McLean, Sellars, Smith, Brady.
Booked: Lunan, McCulloch.
Goals: Templeman 54, 77, 90.
East Fife: Michael Brown, Muir, Durie, Smart, Murdoch (Ovenstone 33), Young, Sloan, Johnstone (Tansey 79), Linn, Byrne, Hislop (Steven Campbell 82). Subs Not Used: Baillie, Cargill.
Booked: Muir, Johnstone.
Goals: Johnstone 13, Ovenstone 86.
Att: 590
Ref: T Robertson
Source: BBC Sport
Source: BBC Sport