Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento controller redirect star notation

Tags:

magento

Can someone explain the star slash notation used throughout magento controllers for redirecting?

The use by core code seems to be inconsistent and I cant find any decent docs out there that can explain the most correct use of this notation.

In the event that there is any doubt over what i am asking.

It is this style of redirect:

$this->_redirect('/');
$this->_redirect('*/*/');
$this->_redirect('*/*');
like image 241
Marty Wallace Avatar asked Aug 14 '12 20:08

Marty Wallace


1 Answers

From left to right:

  • frontname (associated with a router)
  • controller
  • action

When an asterisk is specified, it will use the -current- value of those above.

So assuming you are on adminhtml/catalog/list page, a redirect to */*/something will take you to adminhtml/catalog/something, etc :)

like image 177
Daniel Sloof Avatar answered Sep 29 '22 07:09

Daniel Sloof