How to remove the action of a menu.xml item?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlHow to introduce a new type for widget parameter in Magento2?main.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?What should the action attribute in menu.xml be?Is the column `Action` very important?Magento 2.2.5: Overriding Admin Controller sales/orderHow do I remove the action of a menu.xml item?Magento 2.2.5: Add, Update and Delete existing products Custom Options

Can I run a new neutral wire to repair a broken circuit?

How to write generic function with two inputs?

Why do bosons tend to occupy the same state?

What is the most common color to indicate the input-field is disabled?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

Do UK voters know if their MP will be the Speaker of the House?

Is it possible to create a QR code using text?

Personal Teleportation: From Rags to Riches

Is there a hemisphere-neutral way of specifying a season?

ssTTsSTtRrriinInnnnNNNIiinngg

How to tell a function to use the default argument values?

Why didn't Miles's spider sense work before?

How do conventional missiles fly?

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Why doesn't using multiple commands with a || or && conditional work?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

What type of content (depth/breadth) is expected for a short presentation for Asst Professor interview in the UK?

Is it acceptable for a professor to tell male students to not think that they are smarter than female students?

In 'Revenger,' what does 'cove' come from?

What method can I use to design a dungeon difficult enough that the PCs can't make it through without killing them?

Can the Meissner effect explain very large floating structures?

Why would the Red Woman birth a shadow if she worshipped the Lord of the Light?

Why does this cyclic subgroup have only 4 subgroups?

How does a predictive coding aid in lossless compression?



How to remove the action of a menu.xml item?


How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlHow to introduce a new type for widget parameter in Magento2?main.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?What should the action attribute in menu.xml be?Is the column `Action` very important?Magento 2.2.5: Overriding Admin Controller sales/orderHow do I remove the action of a menu.xml item?Magento 2.2.5: Add, Update and Delete existing products Custom Options













1















I have a menu.xml like 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="Xtento_TrackingImport::menu" action="Xtento_TrackingImport/index/index" title="Some title" module="Xtento_TrackingImport" sortOrder="101" parent="Magento_Sales::sales" resource="Third_Party::menu"/>
</menu>
</config>


I want to remove the 'action' in it.
I've try some thing like this in my override menu.xml file :



<update id="Xtento_TrackingImport::menu"/>


And



<update id="Xtento_TrackingImport::menu" action=""/>


And also



<update id="Xtento_TrackingImport::menu" action="#"/>


But none of them work.





Please help, thanks.










share|improve this question
























  • would it be because you are trying it with the update element?

    – magefms
    21 hours ago











  • thanks, but if i don't update, then how to make this work?

    – fudu
    21 hours ago











  • what is your main goal on this? are you trying to override your third-party menu.xml and remove the action only for that specific menu or are you trying to implement your own menu without an action?

    – magefms
    21 hours ago











  • i'm just trying to remove the action from a item from menu.xml, i don't wanna add a new item at all. Thanks.

    – fudu
    21 hours ago











  • then try like <add id="Xtento_TrackingImport::menu" action=""/>

    – magefms
    21 hours ago















1















I have a menu.xml like 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="Xtento_TrackingImport::menu" action="Xtento_TrackingImport/index/index" title="Some title" module="Xtento_TrackingImport" sortOrder="101" parent="Magento_Sales::sales" resource="Third_Party::menu"/>
</menu>
</config>


I want to remove the 'action' in it.
I've try some thing like this in my override menu.xml file :



<update id="Xtento_TrackingImport::menu"/>


And



<update id="Xtento_TrackingImport::menu" action=""/>


And also



<update id="Xtento_TrackingImport::menu" action="#"/>


But none of them work.





Please help, thanks.










share|improve this question
























  • would it be because you are trying it with the update element?

    – magefms
    21 hours ago











  • thanks, but if i don't update, then how to make this work?

    – fudu
    21 hours ago











  • what is your main goal on this? are you trying to override your third-party menu.xml and remove the action only for that specific menu or are you trying to implement your own menu without an action?

    – magefms
    21 hours ago











  • i'm just trying to remove the action from a item from menu.xml, i don't wanna add a new item at all. Thanks.

    – fudu
    21 hours ago











  • then try like <add id="Xtento_TrackingImport::menu" action=""/>

    – magefms
    21 hours ago













1












1








1








I have a menu.xml like 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="Xtento_TrackingImport::menu" action="Xtento_TrackingImport/index/index" title="Some title" module="Xtento_TrackingImport" sortOrder="101" parent="Magento_Sales::sales" resource="Third_Party::menu"/>
</menu>
</config>


I want to remove the 'action' in it.
I've try some thing like this in my override menu.xml file :



<update id="Xtento_TrackingImport::menu"/>


And



<update id="Xtento_TrackingImport::menu" action=""/>


And also



<update id="Xtento_TrackingImport::menu" action="#"/>


But none of them work.





Please help, thanks.










share|improve this question
















I have a menu.xml like 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="Xtento_TrackingImport::menu" action="Xtento_TrackingImport/index/index" title="Some title" module="Xtento_TrackingImport" sortOrder="101" parent="Magento_Sales::sales" resource="Third_Party::menu"/>
</menu>
</config>


I want to remove the 'action' in it.
I've try some thing like this in my override menu.xml file :



<update id="Xtento_TrackingImport::menu"/>


And



<update id="Xtento_TrackingImport::menu" action=""/>


And also



<update id="Xtento_TrackingImport::menu" action="#"/>


But none of them work.





Please help, thanks.







magento2 overrides action menu.xml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 20 hours ago







fudu

















asked 23 hours ago









fudufudu

46012




46012












  • would it be because you are trying it with the update element?

    – magefms
    21 hours ago











  • thanks, but if i don't update, then how to make this work?

    – fudu
    21 hours ago











  • what is your main goal on this? are you trying to override your third-party menu.xml and remove the action only for that specific menu or are you trying to implement your own menu without an action?

    – magefms
    21 hours ago











  • i'm just trying to remove the action from a item from menu.xml, i don't wanna add a new item at all. Thanks.

    – fudu
    21 hours ago











  • then try like <add id="Xtento_TrackingImport::menu" action=""/>

    – magefms
    21 hours ago

















  • would it be because you are trying it with the update element?

    – magefms
    21 hours ago











  • thanks, but if i don't update, then how to make this work?

    – fudu
    21 hours ago











  • what is your main goal on this? are you trying to override your third-party menu.xml and remove the action only for that specific menu or are you trying to implement your own menu without an action?

    – magefms
    21 hours ago











  • i'm just trying to remove the action from a item from menu.xml, i don't wanna add a new item at all. Thanks.

    – fudu
    21 hours ago











  • then try like <add id="Xtento_TrackingImport::menu" action=""/>

    – magefms
    21 hours ago
















would it be because you are trying it with the update element?

– magefms
21 hours ago





would it be because you are trying it with the update element?

– magefms
21 hours ago













thanks, but if i don't update, then how to make this work?

– fudu
21 hours ago





thanks, but if i don't update, then how to make this work?

– fudu
21 hours ago













what is your main goal on this? are you trying to override your third-party menu.xml and remove the action only for that specific menu or are you trying to implement your own menu without an action?

– magefms
21 hours ago





what is your main goal on this? are you trying to override your third-party menu.xml and remove the action only for that specific menu or are you trying to implement your own menu without an action?

– magefms
21 hours ago













i'm just trying to remove the action from a item from menu.xml, i don't wanna add a new item at all. Thanks.

– fudu
21 hours ago





i'm just trying to remove the action from a item from menu.xml, i don't wanna add a new item at all. Thanks.

– fudu
21 hours ago













then try like <add id="Xtento_TrackingImport::menu" action=""/>

– magefms
21 hours ago





then try like <add id="Xtento_TrackingImport::menu" action=""/>

– magefms
21 hours ago










2 Answers
2






active

oldest

votes


















2














Instead of using update tag in menu.xml, what you can do is create a plugin of menu file in your custom module.



So in your custom module, make following changes.




[Vendor]/[Module]/etc/di.xml




<type name="MagentoBackendModelMenuConfig">
<plugin name="custom_override_meu_action" type="[Vendor][Module]PluginConfig" />
</type>



[Vendor][Module]PluginConfig.php




<?php

namespace [Vendor][Module]Plugin;

class Config

public function afterGetMenu($subject, $result)

$result->get('Xtento_TrackingImport::menu')->setAction(null);
return $result;




This should work.






share|improve this answer























  • worked. thanks mate.

    – fudu
    18 hours ago


















0














<?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>
<update id="Xtento_TrackingImport::menu" action="#"/>
</menu>
</config>


Should work.



But you have to check that your menumenu.xml code should run after <add id="Xtento_TrackingImport::menu"...



You have to create a new module. this should depend on Xtento_TrackingImport



using <depends><Xtento_TrackingImport/></depends>



and the new module's menu you have to rewrite the update menu code.






share|improve this answer























  • Wait, so its still have action? i want to make it without action, the reason i do that because the menu will become like this i.stack.imgur.com/F2BpO.jpg you see the "tracking import" down there? i want it to become look like "Sales Export" the only way to do that is remove the action. Right now it have action, so it become that <a href="trackingimport/index/index">

    – fudu
    18 hours ago












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268435%2fhow-to-remove-the-action-of-a-menu-xml-item%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














Instead of using update tag in menu.xml, what you can do is create a plugin of menu file in your custom module.



So in your custom module, make following changes.




[Vendor]/[Module]/etc/di.xml




<type name="MagentoBackendModelMenuConfig">
<plugin name="custom_override_meu_action" type="[Vendor][Module]PluginConfig" />
</type>



[Vendor][Module]PluginConfig.php




<?php

namespace [Vendor][Module]Plugin;

class Config

public function afterGetMenu($subject, $result)

$result->get('Xtento_TrackingImport::menu')->setAction(null);
return $result;




This should work.






share|improve this answer























  • worked. thanks mate.

    – fudu
    18 hours ago















2














Instead of using update tag in menu.xml, what you can do is create a plugin of menu file in your custom module.



So in your custom module, make following changes.




[Vendor]/[Module]/etc/di.xml




<type name="MagentoBackendModelMenuConfig">
<plugin name="custom_override_meu_action" type="[Vendor][Module]PluginConfig" />
</type>



[Vendor][Module]PluginConfig.php




<?php

namespace [Vendor][Module]Plugin;

class Config

public function afterGetMenu($subject, $result)

$result->get('Xtento_TrackingImport::menu')->setAction(null);
return $result;




This should work.






share|improve this answer























  • worked. thanks mate.

    – fudu
    18 hours ago













2












2








2







Instead of using update tag in menu.xml, what you can do is create a plugin of menu file in your custom module.



So in your custom module, make following changes.




[Vendor]/[Module]/etc/di.xml




<type name="MagentoBackendModelMenuConfig">
<plugin name="custom_override_meu_action" type="[Vendor][Module]PluginConfig" />
</type>



[Vendor][Module]PluginConfig.php




<?php

namespace [Vendor][Module]Plugin;

class Config

public function afterGetMenu($subject, $result)

$result->get('Xtento_TrackingImport::menu')->setAction(null);
return $result;




This should work.






share|improve this answer













Instead of using update tag in menu.xml, what you can do is create a plugin of menu file in your custom module.



So in your custom module, make following changes.




[Vendor]/[Module]/etc/di.xml




<type name="MagentoBackendModelMenuConfig">
<plugin name="custom_override_meu_action" type="[Vendor][Module]PluginConfig" />
</type>



[Vendor][Module]PluginConfig.php




<?php

namespace [Vendor][Module]Plugin;

class Config

public function afterGetMenu($subject, $result)

$result->get('Xtento_TrackingImport::menu')->setAction(null);
return $result;




This should work.







share|improve this answer












share|improve this answer



share|improve this answer










answered 19 hours ago









Yash ShahYash Shah

68618




68618












  • worked. thanks mate.

    – fudu
    18 hours ago

















  • worked. thanks mate.

    – fudu
    18 hours ago
















worked. thanks mate.

– fudu
18 hours ago





worked. thanks mate.

– fudu
18 hours ago













0














<?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>
<update id="Xtento_TrackingImport::menu" action="#"/>
</menu>
</config>


Should work.



But you have to check that your menumenu.xml code should run after <add id="Xtento_TrackingImport::menu"...



You have to create a new module. this should depend on Xtento_TrackingImport



using <depends><Xtento_TrackingImport/></depends>



and the new module's menu you have to rewrite the update menu code.






share|improve this answer























  • Wait, so its still have action? i want to make it without action, the reason i do that because the menu will become like this i.stack.imgur.com/F2BpO.jpg you see the "tracking import" down there? i want it to become look like "Sales Export" the only way to do that is remove the action. Right now it have action, so it become that <a href="trackingimport/index/index">

    – fudu
    18 hours ago
















0














<?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>
<update id="Xtento_TrackingImport::menu" action="#"/>
</menu>
</config>


Should work.



But you have to check that your menumenu.xml code should run after <add id="Xtento_TrackingImport::menu"...



You have to create a new module. this should depend on Xtento_TrackingImport



using <depends><Xtento_TrackingImport/></depends>



and the new module's menu you have to rewrite the update menu code.






share|improve this answer























  • Wait, so its still have action? i want to make it without action, the reason i do that because the menu will become like this i.stack.imgur.com/F2BpO.jpg you see the "tracking import" down there? i want it to become look like "Sales Export" the only way to do that is remove the action. Right now it have action, so it become that <a href="trackingimport/index/index">

    – fudu
    18 hours ago














0












0








0







<?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>
<update id="Xtento_TrackingImport::menu" action="#"/>
</menu>
</config>


Should work.



But you have to check that your menumenu.xml code should run after <add id="Xtento_TrackingImport::menu"...



You have to create a new module. this should depend on Xtento_TrackingImport



using <depends><Xtento_TrackingImport/></depends>



and the new module's menu you have to rewrite the update menu code.






share|improve this answer













<?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>
<update id="Xtento_TrackingImport::menu" action="#"/>
</menu>
</config>


Should work.



But you have to check that your menumenu.xml code should run after <add id="Xtento_TrackingImport::menu"...



You have to create a new module. this should depend on Xtento_TrackingImport



using <depends><Xtento_TrackingImport/></depends>



and the new module's menu you have to rewrite the update menu code.







share|improve this answer












share|improve this answer



share|improve this answer










answered 19 hours ago









Amit BeraAmit Bera

59.6k1676177




59.6k1676177












  • Wait, so its still have action? i want to make it without action, the reason i do that because the menu will become like this i.stack.imgur.com/F2BpO.jpg you see the "tracking import" down there? i want it to become look like "Sales Export" the only way to do that is remove the action. Right now it have action, so it become that <a href="trackingimport/index/index">

    – fudu
    18 hours ago


















  • Wait, so its still have action? i want to make it without action, the reason i do that because the menu will become like this i.stack.imgur.com/F2BpO.jpg you see the "tracking import" down there? i want it to become look like "Sales Export" the only way to do that is remove the action. Right now it have action, so it become that <a href="trackingimport/index/index">

    – fudu
    18 hours ago

















Wait, so its still have action? i want to make it without action, the reason i do that because the menu will become like this i.stack.imgur.com/F2BpO.jpg you see the "tracking import" down there? i want it to become look like "Sales Export" the only way to do that is remove the action. Right now it have action, so it become that <a href="trackingimport/index/index">

– fudu
18 hours ago






Wait, so its still have action? i want to make it without action, the reason i do that because the menu will become like this i.stack.imgur.com/F2BpO.jpg you see the "tracking import" down there? i want it to become look like "Sales Export" the only way to do that is remove the action. Right now it have action, so it become that <a href="trackingimport/index/index">

– fudu
18 hours ago


















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268435%2fhow-to-remove-the-action-of-a-menu-xml-item%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?