Friday 07 December 2007 3:14:24 am
I've got an extension with its own module/view combination. Based on POST variables sent to it, the view PHP script has to assemble an URL that may contain unordered parameters, to which the view should be redirected. Example: /myextension/modules/mymodule/myview.php: <?php (...)
$myURL = 'content/view/full/999';
if( $http->hasPostVariable( 'xParam' ) )
{
$myURL .= '/(xparam)/'.$http->postVariable( 'xParam' );
}
(...)
$Module->redirectTo( $myURL );
(...) ?>
If I use the above, the URL after redirection will be:
/content/view/full/999/<b>%28xparam%29</b>/value and the template will not be able to the value of xparam. Can anyone suggest a solution or other direction? I did look at http and uri ezutils, but didn't find anything that would suggest what's wrong or at what layer. I also suspect there a method that would prepare my URL based on a parameter array, but couldn't find one, either. I thought this may be eZ independent, but made a quick test: <?php
header('Location: http://172.30.0.95/tmp_redirect/target.php/(param)/value');
exit();
?>
The URL after redirection looks fine... Thanks for any suggestions!
--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu
|