| Professor 2007-07-27, 7:02 pm |
|
I am attempting to use the Structures_DataGrid PEAR package with Smarty to
have the data paged. I am using the Array DataSource and whilst I have got
the table showing up fine, the data is never paged. There are 400 items in
the array but the output always says page 1 of 1.
The code is taken directly from the manual for the most part:
// Build data grid
require_once('Structures/DataGrid.php');
$datagrid =& new Structures_DataGrid();
// ... various $datagrid->addColumn calls ...
$datagrid->bind($users);
$datagrid->fill($smarty, array('convertEntities' => false));
$smarty->caching = false; // Don't want to cache this page
$smarty->display('list.tpl');
And in list.tpl I have the code copied directly from the manual e.g.
{getPaging prevImg="<<" nextImg=">>" separator=" | " delta="5"}
and so on.
This is the using the latest stable version of all the appropriate
Structures_* packages, Pager and PHP 5.2.3.
Why isn't it paging the data?
--
View this message in context: http://www.nabble.com/Structures_Da....html#a11835351
Sent from the Pear - General mailing list archive at Nabble.com.
|