Hello,
I am trying to create a back button to go back to the previous module where the user came from. It doesn't work with:
if($this->is_back()) {
$this->parent->reset();
location(array());
return;
}
Base_ActionBarCommon::add('back', 'Back', $this->create_back_href());
Here is a scenario i'm trying to do:
1. (Contact Module) User goes to contacts and views a record.
2. (Contact Module) User clicks a new button to go to MyModule. Here is how the button is created:
$href = Base_BoxCommon::create_href(null,'Custom/MyModue', 'body');
Base_ActionBarCommon::add('view', __('Go to module'), $href);
3. (MyModule) User clicks the back button. Here is how the back button is created:
if($this->is_back()) {
$this->parent->reset();
location(array());
return;
}
Base_ActionBarCommon::add('back', 'Back', $this->create_back_href());
4. Nothing happens. It just shows the loading text but does not go back to the previous module which is the contact module.
Any help or advice on how to do it?
Thanks,
Dex