How to get a url parameter in Magento controller?

后端 未结 3 1637
不思量自难忘°
不思量自难忘° 2020-12-25 14:13

Is there a Magento function to get the value of \"id\" from this url:

http://example.com/path/action/id/123

I know I can split the url on \"/\" to get the va

3条回答
  •  一向
    一向 (楼主)
    2020-12-25 14:47

    If it's a Magento module, you can use the Varien Object getter. If it's for your own module controller, you may want to use the register method.

    Source: http://www.vjtemplates.com/blog/magento/register-and-registry

提交回复
热议问题