template::paginator::get_group (public)

 template::paginator::get_group name pagenum

Defined in packages/acs-templating/tcl/paginator-procs.tcl

Calculates the page group in which the specified page is located.

Parameters:
name - The reference to the paginator object.
pagenum - A number ranging from one to the number of pages in the query result.
Returns:
A number ranging from one to the number of groups in the query result, as determined by both the page size and the group size. This number represents the page group number that the specified page lies in.

Partial Call Graph (max 5 caller/called nodes):
%3 template::paginator::create template::paginator::create (public) template::paginator::get_group template::paginator::get_group template::paginator::create->template::paginator::get_group template::paginator::get_display_info template::paginator::get_display_info (public) template::paginator::get_display_info->template::paginator::get_group template::paginator::get_reference template::paginator::get_reference (private) template::paginator::get_group->template::paginator::get_reference

Testcases:
No testcase defined.
Source code:
    get_reference

    set groupsize $properties(groupsize)

    return [expr {($pagenum - 1 - (($pagenum - 1) % $groupsize)) / $groupsize + 1}]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-templating/tcl/paginator-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: