[contents]
Contents
Syntax
The syntax for paginate.no_items_per_page calls is:
f++:
paginate.no_items_per_page(int)
n++:
@paginate.no_items_per_page(int)
Description
The paginate.no_items_per_page function is for specifying how many items to include per page with pagination, it takes a single non-negative integer parameter as input.
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.
Note: Nift will skip to the first non-whitespace (ie. to the first character that is not a space, tab or newline) after a paginate.no_items_per_page call and inject it to the output file where the call started. If you want to prevent Nift from doing this put a '!' after the call, eg.:
@paginate.no_items_per_page(10)!
f++ example
Example of paginate.no_items_per_page being used with f++:
paginate.no_items_per_page(25)
n++ example
Example of paginate.no_items_per_page being used with n++:
@paginate.no_items_per_page(100)