1

Can anybody help me to build this tab in admin panel by custom module.

enter image description here

i want to achieve something like above picture.

1

3 Answers 3

0

You will need to create an custom module with etc/adminhtml/menu.xml.

For example

<?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="Vendor_Module::name"
         title="Title"
         module="Vendor_Module"
         sortOrder="9999"
         resource="Vendor_Module::name"
         action="actionpath"
    />
 </menu>
</config>

I suggest you look here for more info http://www.mage-world.com/blog/adding-new-menu-item-in-magento-2-custom-module.html

5
  • i followed the link to u provided, and it works, but when i click on menu item it redirects me to 404 not found in admin panel
    – Jay Kapoor
    Commented Aug 16, 2017 at 7:37
  • why is that? should i create a controller for this and how to create admin controller?
    – Jay Kapoor
    Commented Aug 16, 2017 at 7:38
  • Yes, but thats for a different question @JayKapoor
    – Web Weave
    Commented Aug 17, 2017 at 13:50
  • please suggest a way how to solve this and get data from the database in custom tab
    – Jay Kapoor
    Commented Aug 18, 2017 at 6:06
  • As I said, this is to broad for this question, you should make another @JayKapoor
    – Web Weave
    Commented Aug 18, 2017 at 7:41
1

You can refer below link to create custom tab in Magento2 -

https://github.com/jainmegha5395/admin-menu

0

This module creates a Tab Menu with the logo in Magento2 admin: https://github.com/gr33nart/m2_greenart_newtab

Printscreen: https://goo.gl/YPkvn4

Below are some explanations, but in the above Github link I created a module that does this with the custom logo.


Vendor/Module/etc/acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Vendor/Module::Module" title="TabMenu" sortOrder="0" />
            </resource>
        </resources>
    </acl>
</config>


Vendor/Module/etc/adminhtml/menu.xml

<?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="Vendor_Module::Module" title="Level 1" module="Vendor_Module" sortOrder="0" resource="Vendor_Module::Module"/>
        <add id="Vendor_Module::Level_02" title="Level 2" translate="title" module="Magento_Catalog" sortOrder="10" parent="Vendor_Module::Module" action="module/index/index/" resource="Magento_Catalog::products"/>
        <add id="Vendor_Module::catalog_products" title="Catalog" translate="title" module="Magento_Catalog" sortOrder="10" parent="Vendor_Module::Module" action="catalog/product/" resource="Magento_Catalog::products"/>
    </menu>
</config>

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.