Skip to content

menu.xml ​

XML schema: menu.xsd · Linking and validation.

menu.xml adds entries to the QUIQQER administration menu.

Use it when a package provides a custom backend panel or action that should be available from the admin navigation. For package settings pages, prefer settings.xml when the UI can be generated from settings definitions.

Basic Structure ​

Create menu.xml in the package root.

xml
<?xml version="1.0" encoding="UTF-8"?>
<quiqqer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://www.quiqqer.com/docs/schemas/2.x/menu.xsd">
    <menu>
        <item parent="/extras/"
              name="my-package"
              icon="fa fa-cube"
              require="package/vendor/package/bin/Manager"
              permission="vendor.package.edit"
        >
            <locale group="vendor/package" var="menu.myPackage.text"/>
        </item>
    </menu>
</quiqqer>

The item element creates a menu entry. The entry text can be plain text or a locale reference.

QUIQQER imports the direct item entries below <menu> and stores the imported menu definition in the runtime cache. Package updates and setup refresh that cache.

Parent And Name ​

Use parent to place an entry below an existing menu path.

xml
<item parent="/extras/" name="bricks">
    <locale group="quiqqer/bricks" var="menu.bricks.text"/>
</item>

Use name as the stable path segment for the entry. Child entries use the parent path plus this name:

xml
<item parent="/extras/crons/" name="manager">Cron-Manager</item>

Common top-level menu roots include:

  • /quiqqer/
  • /apps/
  • /extras/
  • /settings/
  • /profile/

Backend JavaScript ​

Use require to point to the AMD module that should be loaded when the menu entry is opened.

xml
<item parent="/extras/"
      name="bricks"
      require="package/quiqqer/bricks/bin/Manager"
>
    <locale group="quiqqer/bricks" var="menu.bricks.text"/>
</item>

Use package/vendor/package/... paths for package-provided AMD modules. The path segment is package, not packages.

Icons ​

Use icon for menu icons. Current packages commonly use Font Awesome classes.

xml
<item parent="/extras/" name="bricks" icon="fa fa-th">
    <locale group="quiqqer/bricks" var="menu.bricks.text"/>
</item>

Image URLs can also be used when the package provides an icon asset.

Permissions ​

Use permission to hide menu entries from users that do not have the required permission.

xml
<item parent="/extras/"
      name="bricks"
      permission="quiqqer.bricks.edit"
>
    <locale group="quiqqer/bricks" var="menu.bricks.text"/>
</item>

Multiple permissions can be separated with commas.

xml
<item parent="/extras/crons/"
      name="manager"
      permission="quiqqer.packages.quiqqercron.canUse,quiqqer.cron.edit"
>
    Cron-Manager
</item>

Menu permissions are for visibility and navigation. Protected backend actions still need server-side permission checks.

Real Package Shape ​

quiqqer/bricks adds a single backend menu entry:

xml
<quiqqer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://www.quiqqer.com/docs/schemas/2.x/menu.xsd">
    <menu>
        <item parent="/extras/"
              name="bricks"
              icon="fa fa-th"
              require="package/quiqqer/bricks/bin/Manager"
              permission="quiqqer.bricks.edit"
        >
            <locale group="quiqqer/bricks" var="menu.bricks.text"/>
        </item>
    </menu>
</quiqqer>

quiqqer/cron creates a parent entry and several child entries:

xml
<quiqqer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://www.quiqqer.com/docs/schemas/2.x/menu.xsd">
    <menu>
        <item parent="/extras/"
              name="crons"
              icon="fa fa-clock-o"
              permission="quiqqer.packages.quiqqercron.canUse,quiqqer.cron.edit"
        >
            Crons
        </item>

        <item parent="/extras/crons/"
              name="manager"
              require="package/quiqqer/cron/bin/Manager"
              icon="fa fa-clock-o"
              permission="quiqqer.packages.quiqqercron.canUse,quiqqer.cron.edit"
        >
            Cron-Manager
        </item>
    </menu>
</quiqqer>

Practical Checklist ​

Before adding menu.xml:

  • Choose a stable name because child entries depend on the path.
  • Use the correct parent path.
  • Point require to a package AMD module when the entry opens a panel.
  • Add permission for protected backend areas.
  • Use locale entries for user-facing menu text.
  • Prefer settings.xml for generated package settings pages.

Released under GPL-3.0-or-later.