For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2007 > structures datagrid renderer smarty getPaging function









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author structures datagrid renderer smarty getPaging function
Kaj Schermer Didriksen

2007-07-25, 8:02 am

Hi

I'm trying to make paging work, but I cant get the getPaging function
to work in smarty. Everything else is ok.

it's this in my tpl fil:
....
<div id="content">

<!-- Show paging links using the custom getPaging function -->
{getPaging mode="Sliding" prevImg="<<" nextImg=">>" separator=" | "
delta="25"}

<p>Viser post {$firstRecord} til {$lastRecord} af
{$totalRecordsNum}, side {$currentPage} af {$pagesNum}</p>
....

and I do this in my php file:

....
$test = $datagrid->bind('SELECT [Bbla bla bla]', $options);
if (PEAR::isError($test)) {
echo $test->getMessage();
}

$datagrid->fill($smarty);
$smarty->display('koder.tpl');

....

The renderer states that it registeres the function itself, but it
does not seem so!

Regards
Kaj Schermer Didriksen


Mark Wiesemann

2007-07-25, 7:03 pm

Hi,

Kaj Schermer Didriksen wrote:
> I'm trying to make paging work, but I cant get the getPaging function
> to work in smarty. Everything else is ok.

[...]

Your template and code look right. Have you made sure that you have the
current versions of Smarty, Structures_DataGrid, and
Structures_DataGrid_Renderer_Smarty?

Regards,
Mark

--
http://www.markwiesemann.eu
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com