# The page "index.php"

The index page is composed from 3 parts :

1. A menu (automatically generated)&#x20;
2. Custom infos box if desired.&#x20;
3. A configuration info box.&#x20;

To create an index, we use`renderIndex()`:

```php
$variable_name->renderIndex();
```

By default there are only 2 configurations listed :

1. PHP Version (obtained from the variable `$modversion['min_php']` inside xoops\_version.php).&#x20;
2. XOOPS version (obtained from the variable `$modversion['min_xoops']` inside xoops\_version.php).&#x20;

If both variables are defined in `xoops_version.php`, we get automatically this info box:

![](/files/-LD6N0PUga82kIuxGO-U)

We can add 3 other types of configuration. 1. Display text. 1. Verifying the existence of a file. 1. Checking the chmod of a file.

To add a configuration line, on we use `addConfigBoxLine()`:

```php
$variable_name->addConfigBoxLine($value, $type);
```

* `$value` : With type 'folder' we have to put the folder path. With type 'chmod' we have to put a table with the folder path as a first parameter and the desired chmod as as a second one.&#x20;
* `$type` : 'default', 'folder' or 'chmod'.&#x20;

**Example:**&#x20;

```php
$variable_name = new ModuleAdmin(); 
$variable_name->addInfoBox("Title"); 
$variable_name->addInfoBoxLine("Title", 'Text %s ...', 'value', 'red', 'default');
$variable_name->addConfigBoxLine('----Hello world----', 'default'); 
$folder = XOOPS_ROOT_PATH . '/uploads/modulename/'; 
$variable_name->addConfigBoxLine($folder, 'folder');
$variable_name->addConfigBoxLine(array($folder, '777'), 'chmod'); 
echo $variable_name->addNavigation('index.php'); 
echo $variable_name->renderIndex();
```

**The Result:**&#x20;

![](/files/-LD6N0Pqdp5M6ongF0N4)


---

# 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-page-index.php.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.
