fn: pathtopageno
[contents]

Contents

Syntax

The syntax for pathtopageno calls is:

f++:  
pathtopageno(int)

n++:  
@pathtopageno(int)

Description

The pathtopageno function takes a single integer parameter specifying the pagination page number and returns the relative path from the file being built to the output file for the paginated page.

Note: The hard-coded constants available for pagination are listed here.

See here for some blog templates which use pagination for the posts table, specifically see here (demo) for an example of pagination code.

n++ example

Example of pathtopageno being used with n++:

@if{!s}($[paginate.page_no] < $[paginate.no_pages])
	<a href="@pathtopageno($[paginate.no_pages])">last page</a>