ePages 6.10 - DE_EPAGES/Presentation/API/TLE/PagerHandler.pm

Package DE_EPAGES::Presentation::API::TLE::PagerHandler

Implements TLE functions that convert a TLE loop to a pager, which makes the list sortable and it can span multiple pages.

Base
DE_EPAGES::TLE::API::SetHandler

Functions

Pager
PagerHash

Pager

Creates a pager object from a TLE loop of objects. This allows to display only a section of the list and link to next and previous page.
Note that this implementation is not very efficient, because it requires that the loop already contains all items. Implementing a specialized may be more efficient.

Syntax
#BLOCK("Pager", #Loop, #PageSize, #OrderBy, #OrderDesc)
Example
#BLOCK("Pager", #Shop.ProductFolder.ChildObjects, 25, "Name", 0)
  #LOOP(#Pager.Items)
    #Alias : #Name
    <br />
  #ENDLOOP
#ENDBLOCK
Input
#Loop (ref.array.object)
TLE loop of objects
#PageSize (integer)
number of items on a page
#OrderBy (string)
sort attribute name
#OrderDesc (boolean)
sort in descending direction

PagerHash

Creates a pager object from a TLE loop of hashes. This allows to display only a section of the list and link to next and previous page.
Note that this implementation is not very efficient, because it requires that the loop already contains all items. Implementing a specialized may be more efficient.

Syntax
#BLOCK("PagerHash", #Loop, #PageSize, #OrderBy, #OrderDesc)
Example
#BLOCK("PagerHash", #Shop.Permissions, 25, "Allow", 0)
  #LOOP(#Pager.Items)
    #Alias : #Name
    <br />
  #ENDLOOP
#ENDBLOCK
Input
#Loop (ref.array.hash)
TLE loop of hashes
#PageSize (integer)
number of items on a page
#OrderBy (string)
sort key name
#OrderDesc (boolean)
sort in descending direction