7.3
  • Getting started
  • Development
    • Project wide development, modules, themes and components
      • Project
      • Module
        • Installation and Activation
        • Module skeleton: metadata, composer and structure
        • Defining dependencies between modules
        • Services
        • Module settings
        • Interacting with the database
        • Using namespaces
        • Using Twig in module templates
        • Database Migration
        • Module Certification
        • Tutorials and recipes
        • Deactivation
        • Uninstallation
      • Theme
      • OXID eShop Component
      • Contributing code: the OXID eSales Contributor Agreement
      • Development quality tools and requirements
      • Third-Party Licenses
    • Testing
    • Tell Me Something About Topic X
  • System Architecture
  • Updating
  • Source Code Documentation
  • Conventions for writing developer documentation
  • Glossary
OXID eShop developer documentation
  • Development
  • Project wide development, modules, themes and components
  • Module
  • Module skeleton: metadata, composer and structure
  • menu.xml
  • Edit on GitHub

menu.xml

Menu entry

In order to provide an admin menu entry, you need to add a menu.xml in the root folder of your module.

.
├── composer.json
├── metadata.php
├── menu.xml
├── ...

This will be automatically loaded and added. The order for the admin menu structure:

  1. source/Application/views/admin_twig/menu.xml

  2. source/Application/views/admin_twig/user.xml

  3. Module menu.xml

Menu.xml Examples

The following example is introducing a new main menu point within a new submenu entry:

<?xml version="1.0" encoding="UTF-8"?>
<OX>
    <OXMENU id="NAVIGATION_ESHOPADMIN">
        <MAINMENU id="EXAMPLE_MODULE_MAINMENU">
            <SUBMENU id="EXAMPLE_MODULE_START" cl="EXAMPLE_MODULE_CONTROLLER" />
        </MAINMENU>
    </OXMENU>
</OX>

This example extends an already existing menu entry and list page with a new tab:

<?xml version="1.0" encoding="UTF-8"?>
<OX>
    <OXMENU id="NAVIGATION_ESHOPADMIN">
        <MAINMENU id="mxorders">
            <SUBMENU id="mxdisplayorders" cl="admin_order" list="order_list">
                <TAB id="EXAMPLE_MODULE_ORDERS" cl="EXAMPLE_MODULE_CONTROLLER" />
            </SUBMENU>
        </MAINMENU>
    </OXMENU>
</OX>

The next example also adds a new list within one submenu:

<?xml version="1.0" encoding="UTF-8"?>
<OX>
    <OXMENU id="NAVIGATION_ESHOPADMIN">
        <MAINMENU id="EXAMPLE_MODULE_MAINMENU">
            <SUBMENU id="EXAMPLE_MODULE_SHOW" cl="EXAMPLE_MODULE_FRAME" list="EXAMPLE_MODULE_LIST_VIEW">
                <TAB id="EXAMPLE_MODULE_MAIN" cl="EXAMPLE_MODULE_CONTROLLER"/>
                <TAB id="EXAMPLE_MODULE_DESCRIPTION" cl="EXAMPLE_MODULE_CONTROLLER"/>
            </SUBMENU>
        </MAINMENU>
    </OXMENU>
</OX>

Menu translation

There are two ways of providing the translation for the menu entries added through the menu.xml. Either add it to the admin lang files Admin modules translation or it could also be added using module_options.php Admin modules translation.

Note

While using ‘module_options.php’ for translation, the translations will only be loaded while being logged in as admin.

Previous Next

© Copyright 2003 - 2025, OXID eSales AG.

OXID docs OXID docs | Imprint | Privacy | Contact
Developer documentation v: 7.3
Versions
6.0
6.1
6.2
6.3
6.4
6.5
7.0
7.1
7.2
7.3