Re: [tip] Changing scrolling order outer/middle table [message #424 is a reply to message #423] |
Mon, 27 November 2006 19:14 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
That's nice, but there is an easier method. All scrolling areas, just like pagination areas, are constructed using $this->pageno and $this->rows_per_page, which are used to calculate the OFFSET and LIMIT clauses of the sql SELECT statement.
In multi-line pagination areas $this->rows_per_page is either 10, 25,50 or 100, but in single item scrolling areas $this->rows_per_page is always set to 1.
The reason that each scrolling and pagination area always starts at page 1 is because this is the default value for $this->pageno. When you actually click on one of the scrolling/pagination links it sets the value of $this->pageno to something else.
So, if you want a scrolling or pagination area in a LIST3 screen to start at a value which is not 1 then all you have to do is set $this->pageno to the desired value in the _cm_initialise() method of the relevant class.
I hope you find this tip useful.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|