menu.xml
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 version="1.0" encoding="UTF-8"?>
<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>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.
<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:
<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.
<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.
<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.
<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.
<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:
<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/cron creates a parent entry and several child entries:
<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>Practical Checklist
Before adding menu.xml:
- Choose a stable
namebecause child entries depend on the path. - Use the correct
parentpath. - Point
requireto a package AMD module when the entry opens a panel. - Add
permissionfor protected backend areas. - Use locale entries for user-facing menu text.
- Prefer
settings.xmlfor generated package settings pages.
