In the file menu.xml
located in MyNamespace\Mymodule\etc\adminhtml\menu.xml
, I understand that this file allows me to add new items to the navigation menu in admin panel.
In the <add>
tags, there is an action
attribute that contains values that look like something/somethingelse
. For eg:
<add id="MyNamespace_MyModule::mymodule_testing" title="Some title" module="MyNamespace_MyModule" sortOrder="10" action="Part_A/Part_B" />
What should be entered in the Part_A
and Part_B
of the action
attribute? I doubt they are arbitrary. What do they refer to and what do they stand for? What effects would it have if I put in a wrong thing into this attribute?
Best Answer
Let's say you have the following:
In your
etc/adminhtml/routes.xml
you declare the following route name:Then under
Controller/Adminhtml
you have a folder calledWorld
And finally in this
World
folder you have an action class calledGrid.php
Then the
action
attribute to access this controller action class should behello/world/grid