Have a look at the parameters of the spawn() method.
nPage lets you specify which page the template will be created on (or after). So if you want to spawn it on to an existing page 2, the nPage parameter would be 1 (it is 0-based numbering).
Also, the bOverlay parameter needs to be set to true if nPage has a specific page on which you want to spawn the template. If it is false, the new page is spawned before the specified page.
Thank you Michael.
I edited the a.spawn(); to a.spawn(1); - however, this only overlaid the template on top of the first template that was already there (page 2). Is it possible to remove the template that is now underneath so that the reader can see the new template without the first template in the background?
If you want to delete the page 2 that is spawned from a previous template, you could try something like this:
if (this.numPages > 1) //Check to see if there already is a page 2
this.deletePages(1) //If there is a page 2, delete it
var a = this.getTemplate("New Page"); //Enter the name of your template here
Thank you Michael. This worked great.