I use 3M/Scotch Poster Tape (a repositionable double-sided tape) to temporarily attach templates, available at most office supply stores. I've never had any problems with respect to the adhesive or unwanted movement. For smaller templates, 2-3 strips an inch-and-half long is all you need, larger templates typically need less tape per unit area, just locate strips evenly spaced around the perimeter.
I have several hot glue guns, but have never tried them in my woodworking.