6.4
  • Getting started
  • Development
    • Project wide development, modules, themes and components
      • Project
      • Module
        • Installation and Activation
        • Uninstall
        • Module skeleton: metadata, composer and structure
        • Services
        • Module settings
        • Interacting with the database
        • Using namespaces
        • Testing
        • Database Migration
        • Module Certification
        • Tutorials and recipes
      • Theme
      • OXID eShop Component
      • Contributing code: the OXID eSales Contributor Agreement
      • Development quality tools and requirements
      • Third-Party Licenses
    • Tell Me Something About Topic X
  • System Architecture
  • Update
  • Source Code Documentation
  • Conventions for writing developer documentation
  • Glossary
This is the developer documentation for OXID eShop 6.4, which has reached End of Life (EOL) and is no longer supported.
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/menu.xml

  2. source/Application/views/admin/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 2 ways of providing the translation for the menu entries added through the menu.xml.

Translation files

Either add it to the admin lang files Admin modules translation

Module options

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 2017 - 2025, OXID eSales AG.

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