> For the complete documentation index, see [llms.txt](https://docs.minical.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.minical.io/build-an-extension/config-folder-files/config-file.md).

# Config File

The config file contains all the extension's configuration details. Under the config folder you will find the config.php file, In this file use the $config variable and pass an array of key-value pairs. This array has all the configuration keys and values. This $cofig array will resolve in miniCal core automatically.

```php
$config = array(
        "name" => "Minical Extension Boilerplate",
        "description" => "It is a sample boilerplate extension it contains the basic structure of a typical extension. It will show you the list of bookings.",
        "is_default_active" => 1,
        "version" => "1.0.0", // version of extension
        "logo" => "", // extension's log image
        "view_link" => "bookings_list", // view icon link
        "setting_link" => "bookings_list", // setting icon link
        "categories" => array("payment_process"), // category of extension
        "marketplace_product_link" => ""
    
    );
```

Below is a list of each key and its default values.

<table><thead><tr><th width="150">Key</th><th>Value</th><th>Requirement</th><th>Default value</th></tr></thead><tbody><tr><td>name</td><td>This key contains the extension name as a value.</td><td>Required</td><td>"Extension name" (String)</td></tr><tr><td>description</td><td>This key will conation the short description of the extension.</td><td>Required</td><td>"Extension description" (String)</td></tr><tr><td>is_default_active</td><td>This key will specify whether this extension will be activated by default or not.</td><td>Required</td><td>0 (boolean)</td></tr><tr><td>version</td><td>This key contains the current version of the extension.</td><td>Optional</td><td>"1.0.0" (String)</td></tr><tr><td>logo</td><td>This key contains the extension icon path.</td><td>Optional</td><td>"" (String)</td></tr><tr><td>view_link</td><td>This key contains the route name of the page you want to load on this link click.</td><td>Optional</td><td>"" (String)</td></tr><tr><td>setting_link</td><td>This key same as the view link, except this key will load the setting page for the extension.</td><td>Optional</td><td>"" (String)</td></tr><tr><td>categories</td><td>This key reflected the extension category.</td><td>Optional</td><td>array('') (array)</td></tr><tr><td>marketplace_product_link</td><td>This key will have the link of extension of miniCal marketplace.</td><td>Optional</td><td>"" (String)</td></tr></tbody></table>

#### How to set custom configuration

miniCal allows us to set custom configurations along with the prefined key-values, pass your key-value pair into the config array.

```php
$config = array(
        "name" => "Minical Extension Boilerplate",
        "description" => "It is a sample boilerplate extension it contains the basic structure of a typical extension. It will show you the list of bookings.",
        "is_default_active" => 1,
        "version" => "1.0.0", // version of extension
        "logo" => "", // extension's log image
        "view_link" => "bookings_list", // view icon link
        "setting_link" => "bookings_list", // setting icon link
        "categories" => array("payment_process"), // category of extension
        "marketplace_product_link" => "",
        "custom_key" => "custom value"
    
    );
```

**"logo"** <mark style="color:purple;">this key contains the value path of the extension logo, you can place it inside of your extension folder inside any subfolder. You can name this subfolder accordingly.</mark>

For e.g.

```
 |->minical-extension-boilerplate
    |->images
       |->logo.png
     
 # for this particular example, the value of the logo key would be   
       "logo" => "images/logo.png"
```

#### How to use the custom configuration

For retrieving any configuration key use the given syntax below.&#x20;

At the place of $this->module\_name, you can also use your **extension folder name**.

**Load configuration key on controllers/Models**

```php
$this->all_active_modules[$this->module_name]['custom_key'];

$this->all_active_modules['minical-extension-boilerplate']['custom_key'];
```

**Load configuration key on Libraries/Hooks**

```php
$this->ci->all_active_modules[$this->module_name]['custom_key'];

$this->ci->all_active_modules['minical-extension-boilerplate']['custom_key'];
```

<br>
