0

I want to add a new custom menu above the Views in the custom module.

enter image description here

I am creating a custom report.

Can anyone please suggest?

2 Answers 2

0

You can add this file in your custom module here

app/code/Vendor/Module/etc/adminhtml/menu.xml

Content for this file is..

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Magento_Reports::custom_report" title="Custom Report" translate="title" module="Magento_Reports" sortOrder="9" parent="Magento_Reports::report_products" action="reports/custom/url" resource="Magento_Reports::viewed"/>
    </menu>
</config>

Hope this will help you!

5
  • Thank you. Already try this. but not working
    – Ravi Soni
    Nov 1, 2019 at 13:50
  • Which magento version you're using? Nov 1, 2019 at 13:51
  • I am using 2.3.3
    – Ravi Soni
    Nov 1, 2019 at 13:53
  • Can you please add this in parent ? Magento_Reports::report_statistics Nov 1, 2019 at 14:13
  • I think you've removed this Magento_Reports::report_products so it is not working. Nov 1, 2019 at 14:14
0

You didn't need to override menu.xml. Just add this below code in your menu.xml file :

<menu>
    <add id="Vendor_Module::section"  title="Section"  module="Vendor_Module" sortOrder="05" resource="Magento_Reports::viewed" action="module/index/index"  parent="Magento_Reports::report_products"/>    
</menu>

Hope, it will helpful for you.

1
  • Thank you. Already try this. but not working
    – Ravi Soni
    Nov 1, 2019 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.