0

I have a regular way of returning to the menu item originated from by using the following in the controller of my component:

 $menu = Factory::getApplication()->getMenu()->getActive(); $url = (empty($menu->link) ? 'index.php?option=com_mycomponent&view=transactions' : $menu->link.'&Itemid='.$menu->id); 

But when I come from a modal view there is no menu retrieved and it defaults to the home page. Anyone have a suggestion to enable me to return to the list view with the menu parameters set?

2
  • A modal should be just appearing in front of the existing page, in your case a List page, and when the modal is closed it disappears and the List page is now in focus again. You shouldn't have left the List page, it just loses focus while the Modal is presented. Do you have some code to share or explain the context of what you are trying to do? Commented Nov 28, 2022 at 22:51
  • Thanks for responding Irata, sure can but just as a comment some explanation - I have a button against each record in the list and the button goes to the view form (modal layout rather than the main record form) which as you say shows the modal over the top of the list. I'll edit the question to show more of the code. Cheers. Commented Dec 2, 2022 at 2:45

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.