-
1. Re: Remove spawned template/new page
MichaelN Aug 6, 2014 3:34 PM (in response to jajawheels)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.
-
2. Re: Remove spawned template/new page
jajawheels Aug 6, 2014 4:37 PM (in response to MichaelN)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?
-Miles
-
3. Re: Remove spawned template/new page
MichaelN Aug 6, 2014 5:43 PM (in response to jajawheels)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
a.spawn(); -
4. Re: Remove spawned template/new page
jajawheels Aug 7, 2014 8:43 AM (in response to MichaelN)Thank you Michael. This worked great.

