|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mithril Smarty Rookie
Joined: 21 Feb 2005 Posts: 5
|
Posted: Mon Feb 21, 2005 10:43 am Post subject: dudas pager, help needed |
|
|
Hi all, my first thread inhere
I've trying to get this pager work:
http://smarty.incutio.com/?page=pager
But I can't make it work...I need some more documenation, but the link for the authors, duda, site, redirects to another site with hungarian text
What I've done so far:
Saved the code from here: http://smarty.incutio.com/?page=pager
as function.pager.php in the plugins folder.
Now iv'e made my SQL query:
[php]<?php
$sql = pg_query("SELECT * from foo");
$rs = pg_num_rows($sql);
?>[/php]
And finally I assign this recordset to smarty:
[php]<?php
$smarty->assign('records',''.$rs.'');
?>[/php]
Isn't this what I need to do in my PHP file? And should now be able to place this into my *.tpl file:
Code: | {pager rowcount=$records limit=1 class_num="fl" class_numon="fl" class_text="fl"} |
Need more information
Thanks. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|