Documentation 2.x and 3.x

Sorting records

There are two types of sorting available by default in Administration generator (CRUD):

  • Pointers
  • Numbers

Pointers

ImpressPages CMS sort records with pointers.

Numbers

ImpressPages CMS sort records with pointers.

How to use

To enable this functionality you need to specify these options for area class:

  • sortable - (bool) does the user has a right to change the order of the records
  • sortType - (string) sorting type ('pointers' or 'numbers')
  • sortField - (string) integer field in database to store sorting data. Default value - 'row_number'
  • newRecordPosition - (string) specifies the position where new records should be placed upon other records. Available values: null, 'top', 'bottom'. Defaults to 'bottom'.

Example

Download the example and see how these options are used. Pay attention to items_area.php file. Other files are unchanged from AddressBook example plugin.

Write a comment

You must be logged in to comment.