Please enable JavaScript to view this site.

InterFormNG2 Manual

Navigation: XPath > Built-in functions

ng:last-page-number

Scroll Prev Top Next More

This section explains the built-in XPath function: ng:last-page-number()

 

This function outputs the total number of pages of the output.

 

The function has no parameters.

 

You cannot use this function with other functions in an XPath expression (it can e.g. not be used in an if element) - unlike the ng:page-number function, as this number is inserted as the last thing when rendering the output.

 

The function is shown the value 99999 in the result view of the designer, but is correct in the final rendered output.

 

If you insert the function inside a text with a limited size, then you need to make sure, that the total number of pages can be printed within the designated area.

 

A text can be limited in size either by the properties on the page or by the container in which the text is inserted (if the text is inserted with a dynamic position).

 

If you want to insert elements in your template on the last page only, then you should refer to the section, Template: Make room for total on last page.