template::paginator::get_pages_info (public)

 template::paginator::get_pages_info name datasource pages

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

Gets the page information for a set of pages in the form of a multirow data source with 2 columns: rownum (starting with 1); and page (number of the page). This is a counterpart for get_context when using page objects that are non-contextual. Using this makes it easier to switch from contextual to non-contextual so that less modification is needed on adp template pages. Think in terms of taking out the display of one element in a multirow datasource as compared to converting an adp to handle a list datasource instead of a multirow datasource.

Parameters:
name (required)
The reference to the paginator object.
datasource (required)
The name of the multirow datasource to create
pages (required)
A Tcl list of page numbers.

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

Testcases:
No testcase defined.
Source code:
    get_reference

    upvar 2 $datasource:rowcount rowcount
    set rowcount 0

    upvar 2 $datasource:columns columns
    set columns { page }

    foreach page $pages {

        incr rowcount
        upvar 2 $datasource:$rowcount row

        set row(rownum) $rowcount
        set row(page) $page
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-templating/tcl/paginator-procs.xql

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