Skip to main content
Inspiring
August 5, 2023
Answered

Determine the precise order of the Template page?

  • August 5, 2023
  • 1 reply
  • 859 views

Is there a method to determine the precise order of the Template page? Presently, whenever the template page is displayed, it is positioned at the bottom of the document.

I'm using the following to show/hide TemplatePage via Check box:

if(event.target.value!="Off")
{this.getTemplate("TemplatePage" ).hidden=true;}
else
{this.getTemplate("TemplatePage" ).hidden=false;}

Thank you so much

This topic has been closed for replies.
Correct answer try67

For example, if you want that page to be placed as page 4, use this code:

 

this.getTemplate("TemplatePage").hidden=false;
this.movePage(this.numPages-1, 2);

 

The second parameter for this function is the (zero-based) page number after which you want the page to appear. So we specify 2 (meaning page 3) to make the template page appear as page 4.

If you want it to be the first page in the file you need to specify the parameter as -1.

1 reply

try67
Community Expert
Community Expert
August 5, 2023

When you unhide a Template page it will always show at the end of the file. You can then move it using the movePage command.

KaxkulAuthor
Inspiring
August 5, 2023

Many thanks, do you mind to explain me more how to do so please?

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
August 5, 2023

For example, if you want that page to be placed as page 4, use this code:

 

this.getTemplate("TemplatePage").hidden=false;
this.movePage(this.numPages-1, 2);

 

The second parameter for this function is the (zero-based) page number after which you want the page to appear. So we specify 2 (meaning page 3) to make the template page appear as page 4.

If you want it to be the first page in the file you need to specify the parameter as -1.