The followings are the Paging Variables for the page navigation bar display:
Variable |
Description |
dbobj%pagebar |
Contains a list of format strings used by the system to generate dbobj%page for displaying a page navigation bar.
The elements are positionally sensitive as the page bar (in dbobj%page) will follow the same order as in dbobj%pagebar (except for dbobj%pagebar:sought.)
Not all the format strings will be used. For example, if the sought record is already in the first page of the first block, then "first", "previous" and "back" will not be included in the dbobj%page output variable. Likewise, for the last record, "last", "next" and "forward" will not be included.
In the format string, the following string will be replaced by the corresponding values shown below:
@page the page number of the sought page
@record the record number of the first record of the sought page
@self the path-page of the URL (i.e. {sys%self}).
@query the SQL of the last query URL-encoded. |
dbobj%pagebar:first |
The format string for the first page in the first block. (|<< in the above example.) |
dbobj%pagebar:previous |
The format string for the last page of the previous block. (<< in the above example.) |
dbobj%pagebar:back |
The format string for the page before the sought one. (<- in the above example.) |
dbobj%pagebar:page |
The format string for the pages of the sought block. (The numbers in the above example.) |
dbobj%pagebar:sought |
The format string for the sought page. It usually set to contain no hyperlink and is in a different font, so that it can be easily recognised as the sought page (the one currently on display.)
If dbobj%pagebar:sought is missing, its value will be assumed to be the one in dbobj%pagebar:page.
Since the sought page is among the other pages in the sought block, the system will determine its position and therefore the format string position in the dbobj%pagebar variable is not significant and does not affect the output. |
dbobj%pagebar:forward |
The format string for the page after the sought one. (-> in the above example.) |
dbobj%pagebar:next |
The format string for the first page of the next block. (>> in the above example.) |
dbobj%pagebar:last |
The format string for the last page in the last block. (>>| in the above example.) |
dbobj%page |
Contains in each of its elements the display of a page in the navigation bar, formated by the corresponding format string specified in dbobj%pagebar.
dbobj%page is available only if the "seek" parameter is specified in the "database" command. For details, please refer to the example presented earlier in this section. |
There are other information that helps to determine where the record, the page and the block are:
Variable |
Description |
dbobj%sought:record |
The record number of the sought record
Note: this value always equals to the first number in the "seek" parameter, regardless the possible repositioning of the "seek" position to align with the first record in the page. (Please see dbobj%first:rip.) |
dbobj%sought:page |
The page number of the page that the sought record is in (the sought page) |
dbobj%sought:block |
The block number of the block that the sought page is in (the sought block) |
dbobj%first:recordinpage or dbobj%first:rip |
The record number of the first record in the sought page
Note: this value always reflects the actual "seek" position, so that the next retrieval always start from the first record in the page. |
dbobj%first:pageinblock or dbobj%first:pib |
The page number of the first page in the sought block |
dbobj%first:recordinblock or dbobj%first:rib |
The record number of the first record in the first page of the sought block |
dbobj%last:record |
The record number of the last record in the record set. The value is the same as dbobj%numrecs |
dbobj%last:page |
The page number of the last page in the record set. |
dbobj%last:block |
The block number of the last block in the record set. |
dbobj%last:recordinpage or dbobj%last:rip |
The record number of the last record in the sought page |
dbobj%last:pageinblock or dbobj%last:pib |
The page number of the last page in the sought block |
dbobj%last:recordinblock or dbobj%last:rib |
The record number of the last record in the last page of the sought block |
dbobj%count:recordsinpage or dbobj%count:rip |
The number of records in a page |
dbobj%count:pagesinblock or dbobj%count:pib |
The number of pages in a block |
dbobj%count:recordsinblock or dbobj%count:rib |
The number of records in a block |
|