How do I link to another action in Magento whilst passing a parameter to the controller?
Posted
by
desbest
on Stack Overflow
See other posts from Stack Overflow
or by desbest
Published on 2012-07-11T01:08:50Z
Indexed on
2012/07/11
3:16 UTC
Read the original article
Hit count: 118
magento
I need to pass a parameter, because I would like to redirect back to the module and query string of the current page.
So I can get from
- showdown/index?id=35 --click---> showdown/vote?id=1
- showdown/vote?id=1 --redirect--> showdown/index?id=35
The vote action is not seen.
(The redirect method doesn't work as it takes the index.php url only and no actions, and I cannot find a helper in Magento for creating hyperlinks.)
Does Magneto have a link helper for this?
Example of stuff I want: <a href="<?php echo Mage::Helper->Link->($url, $array); ?>
then $array or whatever variables gets sent to the controller.
© Stack Overflow or respective owner