Inhalte aufrufen

Profilbild

Control Admin Menu

menu

2 Antworten zu diesem Thema

#1 CompleteCoders

CompleteCoders

    Advanced Member

  • Members
  • 54 Beiträge

Geschrieben: 15 November 2017 - 17:36

I want to replace the Orders menu item with my own.

 

I can see from this commit how to add a new menu item.  How can I go about remove an existing one?  

 

Or can I reroute the existing menu item?

 



#2 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1053 Beiträge

Geschrieben: 15 November 2017 - 19:02

You can change routing info of existing menu item:

// Find the orders node by its id (from sitemap.config)
var ordersNode = pluginsNode
    .Parent
    .SelectNode(x => x.Value.Id == "orders");

// Change routing or any other stuff
ordersNode.Value.Action("MyAction", "MyController", new { someRouteValue = 1234  });

Murat Cakir
SmartStore AG


#3 CompleteCoders

CompleteCoders

    Advanced Member

  • Members
  • 54 Beiträge

Geschrieben: 16 November 2017 - 02:06

Perfect, thanks!





Auf dieses Thema antworten



  

Auch markiert mit einem oder mehrerer dieser Schlüsselwörter: menu