0

Hi am new to magento am trying to learn creating admin menu in magento 2 enter image description here

when i clcik on customercustomattribute it directly goes to admin grid but i want to add another field manage attributes and on the click of manage attribute it should go to admin grid. here is my menu.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Eecom. All rights reserved.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
    <menu>
        <add id="Eecom_CustomCustomerAttribute::eecom_custom_index" title="Customer Custom Attribute" module="Eecom_CustomCustomerAttribute"  sortOrder="20" dependsOnModule="Eecom_CustomCustomerAttribute" action="customcustomerattribute/custom/index" resource="Eecom_CustomCustomerAttribute::eecom_custom_index"/>
<!--AddMenu-->
    </menu>
</config>

2 Answers 2

0

Try it like this

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
    <menu>
        <add id="Eecom_CustomCustomerAttribute::eecom_custom_index" title="Customer Custom Attribute" module="Eecom_CustomCustomerAttribute"  sortOrder="20" dependsOnModule="Eecom_CustomCustomerAttribute"  resource="Eecom_CustomCustomerAttribute::eecom_custom_index"/>
        <add id="Eecom_CustomCustomerAttribute::eecom_custom_manage" title="Manage attributes" module="Eecom_CustomCustomerAttribute"  sortOrder="20" dependsOnModule="Eecom_CustomCustomerAttribute" action="customcustomerattribute/custom/index" resource="Eecom_CustomCustomerAttribute::eecom_custom_index" parent="Eecom_CustomCustomerAttribute::eecom_custom_index"/>
    </menu>
</config>
1
  • yeah it works thank you so much
    – Pramod
    Mar 24, 2020 at 9:32
0

Try this

<?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="Eecom_CustomCustomerAttribute::eecom" title="Customer" module="Eecom_CustomCustomerAttribute" sortOrder="20" dependsOnModule="Eecom_CustomCustomerAttribute" resource="Eecom_CustomCustomerAttribute::eecom" />

        <add id="Eecom_CustomCustomerAttribute::eecom_custom" module="Eecom_CustomCustomerAttribute" sortOrder="10" parent="Eecom_CustomCustomerAttribute::trademe" title="Customer Attribute" resource="Eecom_CustomCustomerAttribute::eecom_custom" />
        <add id="Eecom_CustomCustomerAttribute::eecom_custom_index" title="Customer Custom Attribute" module="Eecom_CustomCustomerAttribute" sortOrder="20" parent="Eecom_CustomCustomerAttribute::eecom_custom_index" action="customcustomerattribute/custom/index" resource="Eecom_CustomCustomerAttribute::eecom_custom_index" />
    </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.