Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.5

Bug #9493 _SmartyGetPaging doesn't inherit selfPath option
Submitted: 2006-11-28 23:51 UTC
From: pecus at pecus dot it Assigned: olivierg
Status: Closed Package: Structures_DataGrid_Renderer_Smarty (version 0.1.2)
PHP Version: 4.3.10 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2006-11-28 23:51 UTC] pecus at pecus dot it (pecus)
Description: ------------ I am using rewrites for pages URLs, so that /home/catalogue/category/TENTS maps to /net/page.php?area=/home/catalogue&cat=TENTS With the Smarty renderer (which calls Pager renderer and Pager package), when passing selfPath as a renderer option, columns link use the correct link (eg. /home/catalogue/category/TENTS?orderBy=p1&direction=DESC&page=2), but paging links do not (/net/page.php?orderBy=p1&direction=DESC&page=2). The code is sampled directly from the example in the smarty renderer: <code> $datagridOptions["generate_columns"] = true; $datagridOptions["fields"] = array_unique(array_merge($genericFields, $GC_extraFields)); //$SQLresult is array() $test = $datagrid->bind($SQLresult, $datagridOptions); $rendererOptions = array( 'sortIconASC' => '⇑', 'sortIconDESC' => '⇓', 'selfPath' => '/path/to/rewrite/url/page', 'excludeVars' => array ('lang', 'area', 'category') ); $datagrid->fill($smarty, $rendererOptions); </code> Smarty template: <code> {getPaging prevImg="«" nextImg="»" separator="|" delta="5"} </code> selfPath should be propagated as the urlVar pagerOption. Platform: winXP, PHP 4.3.10, Apache 1.3.33. Pager 2.4.2 stable Structures_DataGrid 0.7.2 beta Structures_DataGrid_Renderer_Pager 0.1.0 beta Structures_DataGrid_Renderer_Smarty 0.1.2 beta

Comments

 [2006-11-29 10:57 UTC] olivierg at php dot net (Olivier Guilyardi)
(changing package and assigning bug)
 [2006-11-29 10:58 UTC] olivierg at php dot net (Olivier Guilyardi)
(changing package version)
 [2006-11-29 12:46 UTC] olivierg at php dot net (Olivier Guilyardi)
Thank you for this detailed report. This bug has been fixed in CVS, and will be available in the next release. Have a good day
 [2006-11-29 12:48 UTC] olivierg at php dot net (Olivier Guilyardi)
Correcting myself: the fix will be available in the next release. Hopefully not the bug ;)