DataGrid_Renderer_Smarty & mod_rewrite
| From: | Chris Boget | Date: | Mon, 30 Oct 2006 11:45:40 +0000 |
| Subject: | DataGrid_Renderer_Smarty & mod_rewrite | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-25676@lists.php.net to get a copy of this message | ||
I've been using the smarty datagrid renderer with some success. At least, it's doing pretty much what I need it to do. In particular, it's setting up the paging how I need and want it.
Now, I'm trying to set up mod_rewrite. Admittedly, I've a very modest understanding of it but I've been able to set up some simple rules and have them working as I need them to. The problem I'm having now is getting the pager to behave correctly when going through the smarty renderer.
I've searched for some tutorials to show me how to set up the pager so that it works with mod_rewrite. This page, http://www.alberton.info/pear_pager_tutorial_mod_rewrite.html, is one among many I found. In following the steps detailed therein, I've set up the $pager_params as shown (modifying the values to suit my specific needs) and passed them to the datagrid->fill() method as so:
$datagrid->fill( $smartyObj, $pager_params );
Unfortunately, I've found that those parameters never actually make it to the pager that the smarty renderer uses. So instead, I pass the parameters within the actual template when calling the registered paging function. What I've set up looks something akin to the following:
{getPaging prevImg="<<" nextImg=">>" fileName="%d.html" append="false"}
When doing it like that, I see (using pring_r on the renderer) that the parameters are actually making it to the pager. However, it doesn't appear that the pager is actually using those settings. It's not using the fileName and it is appending the &page=%d as a GET variable.
So what am I doing wrong? How can I set it up so that it creates the URL as I am expecting it to?
thnx,
Chris