質問

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.

役に立ちましたか?

解決

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

他のヒント

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

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

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>
ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top