# The admin menu

To create the administration menu, we put in xoops\_version.php :

```php
$modversion['system_menu'] = 1;
```

This instruction automatically enables a navigation menu inside the administration area of the module :

![](/files/-LD6N0O7Qyd47waesMxc)

The upper part is automatically generated and tabs are created by the `menu.php` file located in:

```
modulename 
    L admin 
        L menu.php
```

The menu.php file must have the following structure:

```php
$adminmenu[1]['title'] = _MI_MODULENAME_INDEX; $adminmenu[1]['link'] = "admin/index.php";
$adminmenu[1]['icon'] = "images/admin/home.png"; 
$adminmenu[2]['title'] =_MI_MODULENAME_FIRSTMENU; 
$adminmenu[2]['link'] = "admin/firstmenu.php"; 
$adminmenu[2]['icon'] = "images/admin/firstmenu.png"; 
$adminmenu[3]['title'] = _MI_MODULENAME_ABOUT; 
$adminmenu[3]['link'] = "admin/about.php"; 
$adminmenu[3]['icon'] = "images/admin/about.png";
```

```php
$adminmenu\[id\]\['title'\]
```

Variable in which you indicate the title of the link.

```php
$adminmenu\[id\]\['link'\]
```

Variable in which you specify the link path

```php
$adminmenu\[id\]\['icon'\]
```

Variable in which you specify icons path. This icon is used by the Admin theme and by the index menu generated by the Framework. The icons to the page "Index" and "About" should always be the same, for the other icons you are free.

All icons should have a size 32px x 32px


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xoops.gitbook.io/moduleadmin-tutorial/the-admin-menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
